All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alastair McGowan-Douglas <altreus@altre.us>
To: git@vger.kernel.org
Subject: git status -u is mildly astonishing
Date: Thu, 17 Sep 2015 10:44:30 +0100	[thread overview]
Message-ID: <20150917104430.5dd73ae1@dev-05> (raw)

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

             reply	other threads:[~2015-09-17 10:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  9:44 Alastair McGowan-Douglas [this message]
2015-09-17 14:27 ` git status -u is mildly astonishing 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150917104430.5dd73ae1@dev-05 \
    --to=altreus@altre.us \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.