git status -u is mildly astonishing
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
Quoted 3 lines · Alastair McGowan-Douglas
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.
-u takes an optional argument. We can't consider the command-line argument following u as its argument, because that would mean
git status -u --null
would be read as
git status -u=--null
Quoted 2 lines
The usage string implies that -- is used to disambiguate path specs from option arguments
Yes, but the problem here is not path specs Vs options, but anything Vs argument of the previous option.
Quoted 2 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.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Quoted 9 lines · Matthieu Moy
Quoted 2 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"...'.
cover Clarify the documentation of options with optional arguments
The first patch is essentially to make the last one look good. The second is a real documentation bug. The last one may be controversial as it re-documents something already documented in gitcli, but I think it's a good thing.
Matthieu Moy (3):
Documentation: use 'keyid' consistantly, not 'key-id' Documentation/grep: fix documentation of -O
Documentation: make explicit that optional arguments must be stuck
Documentation/git-am.txt | 3 ++- Documentation/git-cherry-pick.txt | 7 ++++--- Documentation/git-commit-tree.txt | 3 ++- Documentation/git-commit.txt | 3 ++- Documentation/git-grep.txt | 8 +++++--- Documentation/git-merge.txt | 4 +++- Documentation/git-rebase.txt | 3 ++- Documentation/git-revert.txt | 7 ++++--- Documentation/git-status.txt | 5 +++-- 9 files changed, 27 insertions(+), 16 deletions(-)
Signature · 1 line
2.5.0.402.g8854c44
PATCH 1/3 Documentation: use 'keyid' consistantly, not 'key-id'
--- Documentation/git-cherry-pick.txt | 4 ++-- Documentation/git-revert.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/git-cherry-pick.txt +2 -2
@@ -101,8 +101,8 @@ effect to your index in a row. --signoff:: Add Signed-off-by line at the end of the commit message. --S[<key-id>]:: ---gpg-sign[=<key-id>]:: +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: GPG-sign commits. --ff::
Documentation/git-revert.txt +2 -2
@@ -80,8 +80,8 @@ more details. This is useful when reverting more than one commits' effect to your index in a row. --S[<key-id>]:: ---gpg-sign[=<key-id>]:: +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: GPG-sign commits. -s::
Signature · 1 line
2.5.0.402.g8854c44
Re: [PATCH 1/3] Documentation: use 'keyid' consistantly, not 'key-id'
Subject: ... use 'keyid' consistantly
Sorry, should s/consistantly/consistently/. Will resend.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Re: [PATCH 1/3] Documentation: use 'keyid' consistantly, not 'key-id'
In reply to Matthieu MoyQuoted 5 lines · Matthieu Moy
Signed-off-by Matthieu Moy <[email protected]>--- Documentation/git-cherry-pick.txt | 4 ++-- Documentation/git-revert.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Hmm, grepping for key-id turns up quite a few more hits. Is there any reason not to change those, too?
-Peff
PATCH 2/3 Documentation/grep: fix documentation of -O
In reply to Matthieu MoySince the argument of -O, --open-file-in-pager is optional, it must be stuck to the command. Reflect this in the documentation.
--- Documentation/git-grep.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/git-grep.txt +2 -2
@@ -160,8 +160,8 @@ OPTIONS For better compatibility with 'git diff', `--name-only` is a synonym for `--files-with-matches`. --O [<pager>]:: ---open-files-in-pager [<pager>]:: +-O[<pager>]:: +--open-files-in-pager[=<pager>]:: Open the matching files in the pager (not the output of 'grep'). If the pager happens to be "less" or "vi", and the user specified only one pattern, the first file is positioned at
Signature · 1 line
2.5.0.402.g8854c44
PATCH 3/3 Documentation: make explicit that optional arguments must be stuck
In reply to Matthieu MoyThe behavior of command-line options with optional arguments is documented in gitcli(7), but it is easy for users to miss, and hard for the same user to understand why e.g. "git status -u no" does not work.
Document this explicitly in the documentation of each short option having an optional argument: they are the most error prone since there is no '=' sign between the option and its argument.
--- Documentation/git-am.txt | 3 ++- Documentation/git-cherry-pick.txt | 3 ++- Documentation/git-commit-tree.txt | 3 ++- Documentation/git-commit.txt | 3 ++- Documentation/git-grep.txt | 4 +++- Documentation/git-merge.txt | 4 +++- Documentation/git-rebase.txt | 3 ++- Documentation/git-revert.txt | 3 ++- Documentation/git-status.txt | 5 +++-- 9 files changed, 21 insertions(+), 10 deletions(-)
Documentation/git-am.txt +2 -1
@@ -141,7 +141,8 @@ default. You can use `--no-utf8` to override this. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. --continue:: -r::
Documentation/git-cherry-pick.txt +2 -1
@@ -103,7 +103,8 @@ effect to your index in a row. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. --ff:: If the current HEAD is the same as the parent of the
Documentation/git-commit-tree.txt +2 -1
@@ -56,7 +56,8 @@ OPTIONS -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commit. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. --no-gpg-sign:: Countermand `commit.gpgSign` configuration variable that is
Documentation/git-commit.txt +2 -1
@@ -314,7 +314,8 @@ changes to tracked files. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commit. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. --no-gpg-sign:: Countermand `commit.gpgSign` configuration variable that is
Documentation/git-grep.txt +3 -1
@@ -165,7 +165,9 @@ OPTIONS Open the matching files in the pager (not the output of 'grep'). If the pager happens to be "less" or "vi", and the user specified only one pattern, the first file is positioned at - the first match automatically. + the first match automatically. The `pager` argument is + optional; if specified, it must be stuck to the option + without a space. -z:: --null::
Documentation/git-merge.txt +3 -1
@@ -67,7 +67,9 @@ include::merge-options.txt[] -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign the resulting merge commit. + GPG-sign the resulting merge commit. The `keyid` argument is + optional; if specified, it must be stuck to the option + without a space. -m <msg>:: Set the commit message to be used for the merge commit (in
Documentation/git-rebase.txt +2 -1
@@ -294,7 +294,8 @@ which makes little sense. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. -q:: --quiet::
Documentation/git-revert.txt +2 -1
@@ -82,7 +82,8 @@ effect to your index in a row. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space. -s:: --signoff::
Documentation/git-status.txt +3 -2
@@ -53,8 +53,9 @@ OPTIONS --untracked-files[=<mode>]:: Show untracked files. + -The mode parameter is optional (defaults to 'all'), and is used to -specify the handling of untracked files. +The mode parameter is used to specify the handling of untracked files. +It is optional: it defaults to 'all', and if specified, it must be +stuck to the option (e.g. `-uno`, but not `-u no`). + The possible options are: +
Signature · 1 line
2.5.0.402.g8854c44
Re: [PATCH 3/3] Documentation: make explicit that optional arguments must be stuck
Quoted 7 lines · Matthieu Moy
The behavior of command-line options with optional arguments is documented in gitcli(7), but it is easy for users to miss, and hard for the same user to understand why e.g. "git status -u no" does not work.
Document this explicitly in the documentation of each short option having an optional argument: they are the most error prone since there is no '=' sign between the option and its argument.
I like this. Even though it is redundant, it is getting information to the place where users can see it, and I don't think it is so large as to obscure the rest of the content.
Documentation/git-am.txt default. You can use `--no-utf8` to override this. · line 145
Quoted 11 lines
Documentation/git-am.txt +2
-1@@ -141,7 +141,8 @@ default. You can use `--no-utf8` to override this. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional; if + specified, it must be stuck to the option without a space.
I think this wording is probably OK. At first I thought it was saying the wrong thing for the long form ("stuck without a space" would mean "--gpg-sign[keyid]"), but I think the syntax just above makes it pretty clear.
Documentation/git-status.txt OPTIONS · line 58
Quoted 13 lines
Documentation/git-status.txt +3
-2@@ -53,8 +53,9 @@ OPTIONS --untracked-files[=<mode>]:: Show untracked files. + -The mode parameter is optional (defaults to 'all'), and is used to -specify the handling of untracked files. +The mode parameter is used to specify the handling of untracked files. +It is optional: it defaults to 'all', and if specified, it must be +stuck to the option (e.g. `-uno`, but not `-u no`).
I think this rearrangement makes the meaning much more clear overall.
-Peff
v2 cover Clarify the documentation of options with optional arguments
In reply to Matthieu MoyChanges since v2:
* Typo in commit message
* key-id -> keyid in more places. Not so important, but we had cases where SYNOPSYS was saying key-id and the full doc keyid, let's make it more uniform (and more grep-able).
* Document what --sign-commit and --open-in-pager do when the optional argument is not specified.
Matthieu Moy (3):
Documentation: use 'keyid' consistently, not 'key-id' Documentation/grep: fix documentation of -O
Documentation: explain optional arguments better
Documentation/git-am.txt | 4 +++- Documentation/git-cherry-pick.txt | 10 ++++++---- Documentation/git-commit-tree.txt | 4 +++- Documentation/git-commit.txt | 6 ++++-- Documentation/git-grep.txt | 9 ++++++--- Documentation/git-merge.txt | 6 ++++-- Documentation/git-rebase.txt | 4 +++- Documentation/git-revert.txt | 10 ++++++---- Documentation/git-status.txt | 5 +++-- Documentation/git-tag.txt | 18 +++++++++--------- 10 files changed, 47 insertions(+), 29 deletions(-)
Signature · 1 line
2.5.0.402.g8854c44
PATCH v2 1/3 Documentation: use 'keyid' consistently, not 'key-id'
--- Documentation/git-cherry-pick.txt | 6 +++--- Documentation/git-commit.txt | 2 +- Documentation/git-merge.txt | 2 +- Documentation/git-revert.txt | 6 +++--- Documentation/git-tag.txt | 18 +++++++++--------- 5 files changed, 17 insertions(+), 17 deletions(-)
Documentation/git-cherry-pick.txt +3 -3
@@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git cherry-pick' [--edit] [-n] [-m parent-number] [-s] [-x] [--ff] - [-S[<key-id>]] <commit>... + [-S[<keyid>]] <commit>... 'git cherry-pick' --continue 'git cherry-pick' --quit 'git cherry-pick' --abort
@@ -101,8 +101,8 @@ effect to your index in a row. --signoff:: Add Signed-off-by line at the end of the commit message. --S[<key-id>]:: ---gpg-sign[=<key-id>]:: +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: GPG-sign commits. --ff::
Documentation/git-commit.txt +1 -1
@@ -13,7 +13,7 @@ SYNOPSIS [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>] [--[no-]status] - [-i | -o] [-S[<key-id>]] [--] [<file>...] + [-i | -o] [-S[<keyid>]] [--] [<file>...] DESCRIPTION -----------
Documentation/git-merge.txt +1 -1
@@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] - [-s <strategy>] [-X <strategy-option>] [-S[<key-id>]] + [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]] [--[no-]rerere-autoupdate] [-m <msg>] [<commit>...] 'git merge' <msg> HEAD <commit>... 'git merge' --abort
Documentation/git-revert.txt +3 -3
@@ -8,7 +8,7 @@ git-revert - Revert some existing commits SYNOPSIS -------- [verse] -'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<key-id>]] <commit>... +'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<keyid>]] <commit>... 'git revert' --continue 'git revert' --quit 'git revert' --abort
@@ -80,8 +80,8 @@ more details. This is useful when reverting more than one commits' effect to your index in a row. --S[<key-id>]:: ---gpg-sign[=<key-id>]:: +-S[<keyid>]:: +--gpg-sign[=<keyid>]:: GPG-sign commits. -s::
Documentation/git-tag.txt +9 -9
@@ -9,7 +9,7 @@ git-tag - Create, list, delete or verify a tag object signed with GPG SYNOPSIS -------- [verse] -'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] +'git tag' [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] <tagname> [<commit> | <object>] 'git tag' -d <tagname>... 'git tag' [-n[<num>]] -l [--contains <commit>] [--points-at <object>]
@@ -24,19 +24,19 @@ to delete, list or verify tags. Unless `-f` is given, the named tag must not yet exist. -If one of `-a`, `-s`, or `-u <key-id>` is passed, the command +If one of `-a`, `-s`, or `-u <keyid>` is passed, the command creates a 'tag' object, and requires a tag message. Unless `-m <msg>` or `-F <file>` is given, an editor is started for the user to type in the tag message. -If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <key-id>` +If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <keyid>` are absent, `-a` is implied. Otherwise just a tag reference for the SHA-1 object name of the commit object is created (i.e. a lightweight tag). A GnuPG signed tag object will be created when `-s` or `-u -<key-id>` is used. When `-u <key-id>` is not used, the +<keyid>` is used. When `-u <keyid>` is not used, the committer identity for the current user is used to find the GnuPG key for signing. The configuration variable `gpg.program` is used to specify custom GnuPG binary.
@@ -63,8 +63,8 @@ OPTIONS --sign:: Make a GPG-signed tag, using the default e-mail address's key. --u <key-id>:: ---local-user=<key-id>:: +-u <keyid>:: +--local-user=<keyid>:: Make a GPG-signed tag, using the given key. -f::
@@ -125,14 +125,14 @@ This option is only applicable when listing tags without annotation lines. Use the given tag message (instead of prompting). If multiple `-m` options are given, their values are concatenated as separate paragraphs. - Implies `-a` if none of `-a`, `-s`, or `-u <key-id>` + Implies `-a` if none of `-a`, `-s`, or `-u <keyid>` is given. -F <file>:: --file=<file>:: Take the tag message from the given file. Use '-' to read the message from the standard input. - Implies `-a` if none of `-a`, `-s`, or `-u <key-id>` + Implies `-a` if none of `-a`, `-s`, or `-u <keyid>` is given. --cleanup=<mode>::
@@ -166,7 +166,7 @@ it in the repository configuration as follows: ------------------------------------- [user] - signingKey = <gpg-key-id> + signingKey = <gpg-keyid> -------------------------------------
Signature · 1 line
2.5.0.402.g8854c44
PATCH v2 2/3 Documentation/grep: fix documentation of -O
In reply to Matthieu MoySince the argument of -O, --open-file-in-pager is optional, it must be stuck to the command. Reflect this in the documentation.
--- Documentation/git-grep.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/git-grep.txt +2 -2
@@ -160,8 +160,8 @@ OPTIONS For better compatibility with 'git diff', `--name-only` is a synonym for `--files-with-matches`. --O [<pager>]:: ---open-files-in-pager [<pager>]:: +-O[<pager>]:: +--open-files-in-pager[=<pager>]:: Open the matching files in the pager (not the output of 'grep'). If the pager happens to be "less" or "vi", and the user specified only one pattern, the first file is positioned at
Signature · 1 line
2.5.0.402.g8854c44
PATCH v2 3/3 Documentation: explain optional arguments better
In reply to Matthieu MoyImprove the documentation of commands taking optional arguments in two ways:
* Documents the behavior of '-O' (for grep) and '-S' (for commands creating commits) when used without the optional argument.
* Document the syntax of these options.
For the second point, the behavior is documented in gitcli(7), but it is easy for users to miss, and hard for the same user to understand why e.g. "git status -u no" does not work.
Document this explicitly in the documentation of each short option having an optional argument: they are the most error prone since there is no '=' sign between the option and its argument.
--- Documentation/git-am.txt | 4 +++- Documentation/git-cherry-pick.txt | 4 +++- Documentation/git-commit-tree.txt | 4 +++- Documentation/git-commit.txt | 4 +++- Documentation/git-grep.txt | 5 ++++- Documentation/git-merge.txt | 4 +++- Documentation/git-rebase.txt | 4 +++- Documentation/git-revert.txt | 4 +++- Documentation/git-status.txt | 5 +++-- 9 files changed, 28 insertions(+), 10 deletions(-)
Documentation/git-am.txt +3 -1
@@ -141,7 +141,9 @@ default. You can use `--no-utf8` to override this. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. --continue:: -r::
Documentation/git-cherry-pick.txt +3 -1
@@ -103,7 +103,9 @@ effect to your index in a row. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. --ff:: If the current HEAD is the same as the parent of the
Documentation/git-commit-tree.txt +3 -1
@@ -56,7 +56,9 @@ OPTIONS -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commit. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. --no-gpg-sign:: Countermand `commit.gpgSign` configuration variable that is
Documentation/git-commit.txt +3 -1
@@ -314,7 +314,9 @@ changes to tracked files. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commit. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. --no-gpg-sign:: Countermand `commit.gpgSign` configuration variable that is
Documentation/git-grep.txt +4 -1
@@ -165,7 +165,10 @@ OPTIONS Open the matching files in the pager (not the output of 'grep'). If the pager happens to be "less" or "vi", and the user specified only one pattern, the first file is positioned at - the first match automatically. + the first match automatically. The `pager` argument is + optional; if specified, it must be stuck to the option + without a space. If `pager` is unspecified, the default pager + will be used (see `core.pager` in linkgit:git-config[1]). -z:: --null::
Documentation/git-merge.txt +3 -1
@@ -67,7 +67,9 @@ include::merge-options.txt[] -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign the resulting merge commit. + GPG-sign the resulting merge commit. The `keyid` argument is + optional and defaults to the committer identity; if specified, + it must be stuck to the option without a space. -m <msg>:: Set the commit message to be used for the merge commit (in
Documentation/git-rebase.txt +3 -1
@@ -294,7 +294,9 @@ which makes little sense. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. -q:: --quiet::
Documentation/git-revert.txt +3 -1
@@ -82,7 +82,9 @@ effect to your index in a row. -S[<keyid>]:: --gpg-sign[=<keyid>]:: - GPG-sign commits. + GPG-sign commits. The `keyid` argument is optional and + defaults to the committer identity; if specified, it must be + stuck to the option without a space. -s:: --signoff::
Documentation/git-status.txt +3 -2
@@ -53,8 +53,9 @@ OPTIONS --untracked-files[=<mode>]:: Show untracked files. + -The mode parameter is optional (defaults to 'all'), and is used to -specify the handling of untracked files. +The mode parameter is used to specify the handling of untracked files. +It is optional: it defaults to 'all', and if specified, it must be +stuck to the option (e.g. `-uno`, but not `-u no`). + The possible options are: +
Signature · 1 line
2.5.0.402.g8854c44
Re: [PATCH v2 0/3] Clarify the documentation of options with optional arguments
In reply to Matthieu MoyQuoted 8 lines · Matthieu Moy
Changes since v2:
* Typo in commit message
* key-id -> keyid in more places. Not so important, but we had cases where SYNOPSYS was saying key-id and the full doc keyid, let's make it more uniform (and more grep-able).
Quoted 7 lines
* Document what --sign-commit and --open-in-pager do when the optional argument is not specified.
Matthieu Moy (3):
Documentation: use 'keyid' consistently, not 'key-id'Documentation/grep: fix documentation of -O
Documentation: explain optional arguments better
This all looks good to me.
-Peff
Quoted 8 lines · Jeff King
Quoted 6 lines · Matthieu Moy
Quoted 2 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.
Quoted 7 lines
Quoted 3 lines
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.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/