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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Aug 6, 2019 at 10:40 UTC 67feca3b1c45a51b204253039139b46cc07e145f
1 file changed +6
Documentation/gitcli.txt
+6
@@ -37,6 +37,12 @@ arguments. Here are the rules:
37 file called HEAD in your work tree, `git diff HEAD` is ambiguous, and
38 you have to say either `git diff HEAD --` or `git diff -- HEAD` to
39 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 `--`).
46 +
47 When writing a script that is expected to handle random user-input, it is
48 a good practice to make it explicit which arguments are which by placing