Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in git tab completion: If git.showSignature = true is set globally, tab completion of commits is garbled



dana wrote on Thu, 07 Mar 2019 23:28 +00:00:
> On 7 Mar 2019, at 13:23, Adrian Vollmer <zsh@xxxxxxxxxxxxxxx> wrote:
> >to reproduce this bug, set showSignature = true in the log section of
> >your global git config file, then type git reset <TAB> in a git repo
> >that has a recent signed commit in its history.
> 
> I guess this is the simple fix for this particular case. `git log` is called
> in a few other places, too, but i'm not sure if they're problematic. Probably
> are and i just don't know how to trigger it.
> 
> Maybe it would make sense to do something more robust instead, though? For
> example, we could have a __git_call wrapper around _call_program that always
> calls git with a safe set of -c options, &c. It'd be a lot of lines changed,
> but any further issues like this could be fixed in one place. idk.
> 

Should we use git-rev-list(1) instead of git-log(1)?  The former is a
plumbing command, so should be the more appropriate interface for this
use-case.

My git(1) does not have the log.showSignature option so I couldn't test
this.  (The knob is missing from _git-config() too.)

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author