git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git status -u is mildly astonishing
@ 2015-09-17  9:44 Alastair McGowan-Douglas
  2015-09-17 14:27 ` Matthieu Moy
  0 siblings, 1 reply; 16+ messages in thread
From: Alastair McGowan-Douglas @ 2015-09-17  9:44 UTC (permalink / raw)
  To: git

Hi list,

Today I found what I thought was a bug in git status:

https://paste.fedoraproject.org/268333/42480833/

It seemed that the argument to -u was being ignored. It turns out that
'no' was not actually being considered an argument to -u in the first
place.

The documentation supports this:

       -u[<mode>], --untracked-files[=<mode>]
           Show untracked files.

There is no space here, but it is not obvious that it is *important*
that there is no space here.

The usage string implies that -- is used to disambiguate path specs
from option arguments

    git status [<options>...] [--] [<pathspec>...]

Therefore I would argue that -u is behaving differently from other
arguments (especially when considered across all git subcommands) by
only accepting its argument when not separated by a space. This at
least should be explicitly documented, but, preferably, should be
consistent with other arguments and use the -- token as the separator.

-Altreus

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-09-19 10:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17  9:44 git status -u is mildly astonishing Alastair McGowan-Douglas
2015-09-17 14:27 ` Matthieu Moy
2015-09-17 17:43   ` Jeff King
2015-09-18  6:52     ` Matthieu Moy
2015-09-18 15:01     ` [PATCH 0/3] Clarify the documentation of options with optional arguments Matthieu Moy
2015-09-18 15:01       ` [PATCH 1/3] Documentation: use 'keyid' consistantly, not 'key-id' Matthieu Moy
2015-09-18 15:24         ` Matthieu Moy
2015-09-18 19:23         ` Jeff King
2015-09-18 15:01       ` [PATCH 2/3] Documentation/grep: fix documentation of -O Matthieu Moy
2015-09-18 15:01       ` [PATCH 3/3] Documentation: make explicit that optional arguments must be stuck Matthieu Moy
2015-09-18 19:27         ` Jeff King
2015-09-19  7:47       ` [PATCH v2 0/3] Clarify the documentation of options with optional arguments Matthieu Moy
2015-09-19  7:47         ` [PATCH v2 1/3] Documentation: use 'keyid' consistently, not 'key-id' Matthieu Moy
2015-09-19  7:47         ` [PATCH v2 2/3] Documentation/grep: fix documentation of -O Matthieu Moy
2015-09-19  7:47         ` [PATCH v2 3/3] Documentation: explain optional arguments better Matthieu Moy
2015-09-19 10:50         ` [PATCH v2 0/3] Clarify the documentation of options with optional arguments Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).