It's hard for scripted uses of rev-list, etc, to avoid option injection from untrusted arguments, because revision arguments must come before any "--" separator. I.e.: git rev-list "$revision" -- "$path" might mistake "$revision" for an option (with rev-list, that would make it an error, but something like git-log would default to HEAD). This series provides an alternative to "--" to stop option parsing without indicating that further arguments are pathspecs. [1/3]: revision: allow --end-of-options to end option parsing [2/3]: parse-options: allow --end-of-options as a synonym for "--" [3/3]: gitcli: document --end-of-options Documentation/gitcli.txt | 6 ++++++ parse-options.c | 3 ++- revision.c | 8 +++++++- t/t0040-parse-options.sh | 7 +++++++ t/t4202-log.sh | 7 +++++++ t/t6000-rev-list-misc.sh | 8 ++++++++ 6 files changed, 37 insertions(+), 2 deletions(-)