Skip to content

Commit 67feca3

Browse files
peffgitster
authored andcommitted
gitcli: document --end-of-options
Now that --end-of-options is available for any users of setup_revisions() or parse_options(), which should be effectively everywhere, we can guide people to use it for all their disambiguating needs. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 51b4594 commit 67feca3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/gitcli.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ arguments. Here are the rules:
3737
file called HEAD in your work tree, `git diff HEAD` is ambiguous, and
3838
you have to say either `git diff HEAD --` or `git diff -- HEAD` to
3939
disambiguate.
40+
41+
* Because `--` disambiguates revisions and paths in some commands, it
42+
cannot be used for those commands to separate options and revisions.
43+
You can use `--end-of-options` for this (it also works for commands
44+
that do not distinguish between revisions in paths, in which case it
45+
is simply an alias for `--`).
4046
+
4147
When writing a script that is expected to handle random user-input, it is
4248
a good practice to make it explicit which arguments are which by placing

0 commit comments

Comments
 (0)