Re: [PATCH] completion: correct zsh detection when run from git-completion.zsh (Re: [PATCH v2] completion: reduce overhead of clearing cached --options)

2018-06-12 Thread Rick van Hattem
On 11 June 2018 at 20:20, Jonathan Nieder wrote: > SZEDER Gábor wrote: > >> Being in RC phase, I'm all for aiming for a minimal solution. >> However, I don't think that the better fix would be erm.. any "less >> minimal": > > Thanks again. May we have your sign-off? > >

Re: [PATCH] completion: correct zsh detection when run from git-completion.zsh (Re: [PATCH v2] completion: reduce overhead of clearing cached --options)

2018-06-12 Thread SZEDER Gábor
On Mon, Jun 11, 2018 at 8:20 PM, Jonathan Nieder wrote: > From: SZEDER Gábor > Subject: completion: correct zsh detection when run from git-completion.zsh > > v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached > --options, 2018-04-18) worked around a bug in bash's "set" builtin on

Re: [PATCH] completion: correct zsh detection when run from git-completion.zsh (Re: [PATCH v2] completion: reduce overhead of clearing cached --options)

2018-06-12 Thread SZEDER Gábor
On Mon, Jun 11, 2018 at 8:20 PM, Jonathan Nieder wrote: > From: SZEDER Gábor > Subject: completion: correct zsh detection when run from git-completion.zsh > > v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached > --options, 2018-04-18) worked around a bug in bash's "set" builtin on

[PATCH] completion: correct zsh detection when run from git-completion.zsh (Re: [PATCH v2] completion: reduce overhead of clearing cached --options)

2018-06-11 Thread Jonathan Nieder
From: SZEDER Gábor Subject: completion: correct zsh detection when run from git-completion.zsh v2.18.0-rc0~90^2 (completion: reduce overhead of clearing cached --options, 2018-04-18) worked around a bug in bash's "set" builtin on MacOS by using compgen instead. It was careful to avoid breaking

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-11 Thread Junio C Hamano
Jonathan Nieder writes: > Hi, > > SZEDER Gábor wrote: > >> Being in RC phase, I'm all for aiming for a minimal solution. >> However, I don't think that the better fix would be erm.. any "less >> minimal": >> >> diff --git a/contrib/completion/git-completion.bash >>

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-08 Thread SZEDER Gábor
On Fri, Jun 8, 2018 at 11:52 PM, Jonathan Nieder wrote: > SZEDER Gábor wrote: >> On Fri, Jun 8, 2018 at 11:23 PM, Jonathan Nieder wrote: > + [[ -z "${GIT_SOURCING_ZSH_COMPLETION}" ]] ; then >>> >>> Needs a - before the } to avoid errors in a shell where the user has >>> chosen to use "set

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-08 Thread Jonathan Nieder
SZEDER Gábor wrote: > On Fri, Jun 8, 2018 at 11:23 PM, Jonathan Nieder wrote: >>> + [[ -z "${GIT_SOURCING_ZSH_COMPLETION}" ]] ; then >> >> Needs a - before the } to avoid errors in a shell where the user has >> chosen to use "set -u". See v1.7.4-rc0~159 (completion: fix zsh check >> under

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-08 Thread SZEDER Gábor
On Fri, Jun 8, 2018 at 11:23 PM, Jonathan Nieder wrote: > Hi, > > SZEDER Gábor wrote: > >> Being in RC phase, I'm all for aiming for a minimal solution. >> However, I don't think that the better fix would be erm.. any "less >> minimal": >> >> diff --git a/contrib/completion/git-completion.bash

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-08 Thread Jonathan Nieder
Hi, SZEDER Gábor wrote: > Being in RC phase, I'm all for aiming for a minimal solution. > However, I don't think that the better fix would be erm.. any "less > minimal": > > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-08 Thread SZEDER Gábor
> Related question: what would it take to add a zsh completion sanity > check to t/t9902-completion.sh? I don't know. What I do know is that we can't just run our tests with ZSH, e.g. running 'zsh ./t-basic.sh' shows mostly failures. So it won't be as simple as modifying 't/lib-bash.sh'

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-07 Thread Rick van Hattem
The zsh script expects the bash completion script to be available so that might be the issue here. To reproduce this is what I do. First, a sparse checkout: # mkdir ~/git # cd ~/git # git init # git remote add origin g...@github.com:git/git.git # git config core.sparseCheckout true # mkdir

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-07 Thread Dave Borowitz
On Thu, Jun 7, 2018 at 1:48 AM Jonathan Nieder wrote: > Whatever > I try, I end up with one of two results: either it uses zsh's standard > completion, or it spews a stream of errors about missing functions > like compgen. What am I doing wrong? Try adding to the top of your .zshrc: autoload -U

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-06-06 Thread Jonathan Nieder
Hi, SZEDER Gábor wrote: > Other Bash versions, notably 4.4.19 on macOS via homebrew (i.e. a > newer version on the same platform) and 3.2.25 on CentOS (i.e. a > slightly earlier version, though on a different platform) are not > affected. ZSH in macOS (the versions shipped by default or

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-05-07 Thread Junio C Hamano
Todd Zullinger writes: > Hi Matthew, > > Matthew Coleman wrote: >> I haven't seen any discussion about this recently. What >> are the chances of getting it merged? I'd like to see this >> included in 2.18. > > Junio's last few "What's cooking" updates have mentioned it: > >> *

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-05-07 Thread Todd Zullinger
Hi Matthew, Matthew Coleman wrote: > I haven't seen any discussion about this recently. What > are the chances of getting it merged? I'd like to see this > included in 2.18. Junio's last few "What's cooking" updates have mentioned it: > * sg/completion-clear-cached (2018-04-18) 1 commit >

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-05-07 Thread Matthew Coleman
I haven't seen any discussion about this recently. What are the chances of getting it merged? I'd like to see this included in 2.18. >> To get the names of all '$__git_builtin_*' variables caching --options >> of builtin commands in order to unset them, 8b0eaa41f2 (completion: >> clear cached

Re: [PATCH v2] completion: reduce overhead of clearing cached --options

2018-04-17 Thread Junio C Hamano
SZEDER Gábor writes: > To get the names of all '$__git_builtin_*' variables caching --options > of builtin commands in order to unset them, 8b0eaa41f2 (completion: > clear cached --options when sourcing the completion script, > 2018-03-22) runs a 'set |sed s///' pipeline.