Closed benknoble closed 4 months ago
/preview
Preview email sent as pull.1725.git.1714512880997.gitgitgadget@gmail.com
/submit
Submitted as pull.1725.git.1714513995564.gitgitgadget@gmail.com
To fetch this version into FETCH_HEAD
:
git fetch https://github.com/gitgitgadget/git/ pr-1725/benknoble/fix-zsh-completion-repo-cache-v1
To fetch this version to local tag pr-1725/benknoble/fix-zsh-completion-repo-cache-v1
:
git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-1725/benknoble/fix-zsh-completion-repo-cache-v1
On the Git mailing list, Junio C Hamano wrote (reply to this):
"D. Ben Knoble via GitGitGadget" <gitgitgadget@gmail.com> writes:
> Commit beb6ee7163 (completion: extract repository discovery from
> __gitdir(), 2017-02-03) anticipated this problem by marking
> __git_repo_path as local in __git_main and __gitk_main for Bash
> completion but did not give the same mark to _git for Zsh completion.
> Thus make __git_repo_path local for Zsh completion, too.
Will queue. The explanation makes tons of sense.
Thanks.
This branch is now known as dk/zsh-git-repo-path-fix
.
This patch series was integrated into seen via https://github.com/git/git/commit/140d03799610a6ee55346e15114b88eadc018479.
There was a status update in the "New Topics" section about the branch dk/zsh-git-repo-path-fix
on the Git mailing list:
Command line completion support for zsh (in contrib/) has been updated to stop exposing internal state to end-user shell interaction. Will merge to 'next'. source: <pull.1725.git.1714513995564.gitgitgadget@gmail.com>
This patch series was integrated into seen via https://github.com/git/git/commit/b0a23d7029f94e8372e8fddc6ce051b215c138d6.
This patch series was integrated into next via https://github.com/git/git/commit/0446d8e63ab4a041136f96586975ba821f501bb3.
There was a status update in the "Cooking" section about the branch dk/zsh-git-repo-path-fix
on the Git mailing list:
Command line completion support for zsh (in contrib/) has been updated to stop exposing internal state to end-user shell interaction. Will merge to 'master'. source: <pull.1725.git.1714513995564.gitgitgadget@gmail.com>
There was a status update in the "Cooking" section about the branch dk/zsh-git-repo-path-fix
on the Git mailing list:
Command line completion support for zsh (in contrib/) has been updated to stop exposing internal state to end-user shell interaction. Will merge to 'master'. source: <pull.1725.git.1714513995564.gitgitgadget@gmail.com>
This patch series was integrated into seen via https://github.com/git/git/commit/cc15e855f3be9c82c4723b1d8a5223bb05f7c978.
This patch series was integrated into seen via https://github.com/git/git/commit/1ae0d15bc5321e1d09007cd23f5055a6a0b98f28.
This patch series was integrated into seen via https://github.com/git/git/commit/97673bdea7918488b3ce0a4591221ecdef299975.
This patch series was integrated into master via https://github.com/git/git/commit/97673bdea7918488b3ce0a4591221ecdef299975.
This patch series was integrated into next via https://github.com/git/git/commit/97673bdea7918488b3ce0a4591221ecdef299975.
Closed via 97673bdea7918488b3ce0a4591221ecdef299975.
Prevent leaking a local variable used to cache the repo path, which breaks future completions in different repositories using the shell, when using contributed Zsh completion.
I made a few attempts at starting a test script for this based on https://unix.stackexchange.com/a/668827/301073, but that code doesn't work and it was all becoming precariously complicated (sh starting zsh to start zsh in a pty which would receive keystrokes and check specific outputs: I couldn't make certain pieces work in a normal way locally, let alone as part of Git's test suite). Suffice to say I have tested this myself?
CC: Felipe Contreras felipe.contreras@gmail.com