Merge branch 'nd/exclude-workaround-top-heavy'
[gitweb.git] / revision.c
index e0e80f13ef12c28e7f791e4c7ca9519e3c5aecc0..39cc6b0eab413d59c8f8c35a8d994df8d2025741 100644 (file)
@@ -1781,7 +1781,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
                         * but the latter we have checked in the main loop.
                         */
                        for (j = i; j < argc; j++)
-                               verify_filename(revs->prefix, argv[j]);
+                               verify_filename(revs->prefix, argv[j], j == i);
 
                        append_prune_data(&prune_data, argv + i);
                        break;
@@ -2075,6 +2075,7 @@ int prepare_revision_walk(struct rev_info *revs)
 {
        int nr = revs->pending.nr;
        struct object_array_entry *e, *list;
+       struct commit_list **next = &revs->commits;
 
        e = list = revs->pending.objects;
        revs->pending.nr = 0;
@@ -2085,12 +2086,11 @@ int prepare_revision_walk(struct rev_info *revs)
                if (commit) {
                        if (!(commit->object.flags & SEEN)) {
                                commit->object.flags |= SEEN;
-                               commit_list_insert(commit, &revs->commits);
+                               next = commit_list_append(commit, next);
                        }
                }
                e++;
        }
-       commit_list_reverse(&revs->commits);
        commit_list_sort_by_date(&revs->commits);
        if (!revs->leak_pending)
                free(list);