From: Jeff King Date: Thu, 07 Dec 2017 00:24:39 GMT Subject: Re: git commit file completion recently broke Message-ID: <20171207002439.GB21003@sigill.intra.peff.net> In-Reply-To: <20171207002234.GA21003@sigill.intra.peff.net> On Wed, Dec 06, 2017 at 07:22:35PM -0500, Jeff King wrote: > On Wed, Dec 06, 2017 at 04:01:51PM -0800, Jacob Keller wrote: > > > I think I narrowed this down to "git diff-index --name-only --relative > > HEAD" producing a list of files *not* relative to the current > > directory. > > Hmm, my guess would have been something funny in the setup code > forgetting our original prefix. > > But nope, it looks like the culprit is f7923a5ece (diff: use > skip_to_optional_val(), 2017-12-04), which switched over parsing of > "--relative". Oh, actually, I guess I was half-right. It feeds &options->prefix as the "default", meaning that we overwrite it with the empty string. I don't think "--relative" works for the semantics of skip_to_optional_value, since it needs: --relative=foo: set prefix to "foo" --relative: leave prefix untouched -Peff