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

Re: [REGRESSION ps/stash-in-c] git stash show -v

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 20, 2019, 09:30 UTC
Message-ID
<CACsJy8BMdjR9cS4qDVaNXtW-U0cQt5e3au2y5PsW7eKQdd3xJA@mail.gmail.com>
In-Reply-To
<20190320050449.GA6401@sigill.intra.peff.net>
On Wed, Mar 20, 2019 at 12:06 PM Jeff King <peff@peff.net> wrote:
Show 17 quoted lines
>
> On Tue, Mar 19, 2019 at 11:18:26PM +0000, Thomas Gummerer wrote:
>
> > From a quick search I couldn't find where 'git diff' actually parses
> > the '-v' argument, but I wonder if we should actually disallow it, in
> > case we want to use it for something else in the future?  It's not
> > documented anywhere in the docs either.
>
> It's a bit interesting, actually. git-diff uses setup_revisions() to
> parse its arguments, which picks up any diff options, as well as parsing
> the revs and pathspecs.
>
> ...
>
>   - we may want to teach the "diff" porcelain not to accept useless
>     revision options. I suspect it may be a bit tricky, just because of
>     the way the code takes advantage of setup_revisions.

This is actually in my TODO list. Once the parseopt conversion for revision.c and diff.c is done, "git diff --help" would be _very_ long because of this exact problem. But then once the conversion is over, I think removing unused options is quite simple (by manipulating 'struct option[]' array before calling parse_options). -- Duy

Previous: Jeff KingNext: Thomas Gummerer
Message 7 of 15 in “[REGRESSION ps/stash-in-c] git stash show -v”
  1. Denton LiuMar 19, 2019
  2. Thomas GummererMar 19, 2019
  3. Junio C HamanoMar 20, 2019
  4. Thomas GummererMar 20, 2019
  5. Junio C HamanoMar 20, 2019
  6. Jeff KingMar 20, 2019
  7. Duy NguyenMar 20, 2019
  8. Thomas GummererMar 20, 2019
  9. stash: setup default diff output format if necessaryThomas Gummerer, Mar 20, 2019
  10. Denton LiuMar 20, 2019
  11. Denton LiuMar 20, 2019
  12. Thomas GummererMar 28, 2019
  13. Jeff KingMar 21, 2019
  14. Junio C HamanoMar 22, 2019
  15. Jeff KingMar 22, 2019

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.