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

Re: git status -u is mildly astonishing

From
Jeff King <peff@peff.net>
Date
Sep 17, 2015, 17:43 UTC
Message-ID
<20150917174306.GA29171@sigill.intra.peff.net>
In-Reply-To
<vpqd1xhqfxg.fsf@anie.imag.fr>
On Thu, Sep 17, 2015 at 04:27:39PM +0200, Matthieu Moy wrote:
Show 9 quoted lines
> > Therefore I would argue that -u is behaving differently from other
> > arguments (especially when considered across all git subcommands)
> 
> This is because you have options with non-optional argument in mind, or
> options that have no short version.
> 
> If I grep the source correctly, the only options accepting a short
> version and an optional string argument are "{merge,am,commit,revert}
> -S", "grep -O" and "status -u", which behave consistantly.

Exactly. This is covered in gitcli(7)*, but I wonder if it is worth calling attention to this behavior specifically in the documentation of those options.

-Peff
[*] Try "git help cli", the bit starting with 'Here are the rules
    regarding the "flags"...'.
Previous: Matthieu MoyNext: Matthieu Moy
Message 3 of 16 in “git status -u is mildly astonishing”
  1. Alastair McGowan-DouglasSep 17, 2015
  2. Matthieu MoySep 17, 2015
  3. Jeff KingSep 17, 2015
  4. Matthieu MoySep 18, 2015
  5. 0/3 Clarify the documentation of options with optional argumentsMatthieu Moy, Sep 18, 2015
  6. 1/3 Documentation: use 'keyid' consistantly, not 'key-id'Matthieu Moy, Sep 18, 2015
  7. Matthieu MoySep 18, 2015
  8. Jeff KingSep 18, 2015
  9. 2/3 Documentation/grep: fix documentation of -OMatthieu Moy, Sep 18, 2015
  10. 3/3 Documentation: make explicit that optional arguments must be stuckMatthieu Moy, Sep 18, 2015
  11. Jeff KingSep 18, 2015
  12. 0/3 Clarify the documentation of options with optional argumentsMatthieu Moy, Sep 19, 2015
  13. 1/3 Documentation: use 'keyid' consistently, not 'key-id'Matthieu Moy, Sep 19, 2015
  14. 2/3 Documentation/grep: fix documentation of -OMatthieu Moy, Sep 19, 2015
  15. 3/3 Documentation: explain optional arguments betterMatthieu Moy, Sep 19, 2015
  16. Jeff KingSep 19, 2015

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.