Message ID | pull.1725.git.1714513995564.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3c20acdf465ba211978108ca8507d41e62a016fd |
Headers | show |
Series | completion: zsh: stop leaking local cache variable | expand |
"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.
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index cac6f618817..f5877bd7a1e 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -272,6 +272,7 @@ _git () { local _ret=1 local cur cword prev + local __git_repo_path cur=${words[CURRENT]} prev=${words[CURRENT-1]}