diff options
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 07412297f0..51690e480d 100644 --- a/revision.c +++ b/revision.c @@ -2523,6 +2523,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s int i, flags, left, seen_dashdash, got_rev_arg = 0, revarg_opt; struct argv_array prune_data = ARGV_ARRAY_INIT; const char *submodule = NULL; + int seen_end_of_options = 0; if (opt) submodule = opt->submodule; @@ -2552,7 +2553,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s revarg_opt |= REVARG_CANNOT_BE_FILENAME; for (left = i = 1; i < argc; i++) { const char *arg = argv[i]; - if (*arg == '-') { + if (!seen_end_of_options && *arg == '-') { int opts; opts = handle_revision_pseudo_opt(submodule, @@ -2574,6 +2575,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s continue; } + if (!strcmp(arg, "--end-of-options")) { + seen_end_of_options = 1; + continue; + } + opts = handle_revision_opt(revs, argc - i, argv + i, &left, argv, opt); if (opts > 0) { |