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

Re: git status -u is mildly astonishing

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 18, 2015, 06:52 UTC
Message-ID
<vpq6138md7u.fsf@anie.imag.fr>
In-Reply-To
<20150917174306.GA29171@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> On Thu, Sep 17, 2015 at 04:27:39PM +0200, Matthieu Moy wrote:
>
>> > 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.

I think it does make sense to say it explicitly in the doc for each option. There are not many, and even though I think Git is doing the right thing, I also have to admit that it's confusing.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jeff KingNext: Matthieu Moy
Message 4 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.