diff options
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/revision.c b/revision.c index b3554ed11b..e0e80f13ef 100644 --- a/revision.c +++ b/revision.c @@ -1715,17 +1715,21 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s submodule = opt->submodule; /* First, search for "--" */ - seen_dashdash = 0; - for (i = 1; i < argc; i++) { - const char *arg = argv[i]; - if (strcmp(arg, "--")) - continue; - argv[i] = NULL; - argc = i; - if (argv[i + 1]) - append_prune_data(&prune_data, argv + i + 1); + if (opt && opt->assume_dashdash) { seen_dashdash = 1; - break; + } else { + seen_dashdash = 0; + for (i = 1; i < argc; i++) { + const char *arg = argv[i]; + if (strcmp(arg, "--")) + continue; + argv[i] = NULL; + argc = i; + if (argv[i + 1]) + append_prune_data(&prune_data, argv + i + 1); + seen_dashdash = 1; + break; + } } /* Second, deal with arguments and options */ @@ -2062,6 +2066,11 @@ static void set_children(struct rev_info *revs) } } +void reset_revision_walk(void) +{ + clear_object_flags(SEEN | ADDED | SHOWN); +} + int prepare_revision_walk(struct rev_info *revs) { int nr = revs->pending.nr; @@ -2076,11 +2085,13 @@ int prepare_revision_walk(struct rev_info *revs) if (commit) { if (!(commit->object.flags & SEEN)) { commit->object.flags |= SEEN; - commit_list_insert_by_date(commit, &revs->commits); + commit_list_insert(commit, &revs->commits); } } e++; } + commit_list_reverse(&revs->commits); + commit_list_sort_by_date(&revs->commits); if (!revs->leak_pending) free(list); |