git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git commit file completion recently broke

From
Jeff King <peff@peff.net>
Date
Dec 7, 2017, 00:24 UTC
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:
Show 12 quoted lines
> 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
Previous: Jeff KingNext: Jacob Keller
Message 5 of 13 in “git commit file completion recently broke”
  1. Jacob KellerDec 6, 2017
  2. Jacob KellerDec 7, 2017
  3. Jacob KellerDec 7, 2017
  4. Jeff KingDec 7, 2017
  5. Jeff KingDec 7, 2017
  6. Jacob KellerDec 7, 2017
  7. Jeff KingDec 7, 2017
  8. Jacob KellerDec 7, 2017
  9. Jeff KingDec 7, 2017
  10. Christian CouderDec 7, 2017
  11. Jeff KingDec 7, 2017
  12. Junio C HamanoDec 7, 2017
  13. Jacob KellerDec 7, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.