diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-29 17:51:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-29 17:51:30 -0700 |
commit | 6a8989709efbd6d5187005497907264fde026ae9 (patch) | |
tree | 9a575ab5e173c5e5f0203a6053531eb3d0055bec /revision.c | |
parent | 5fa8bf6bf9d20ccb37ed46ec7027a9ac64b2a2a7 (diff) | |
parent | a81a7fbc1a423b112158c2d8647ee80caba108ef (diff) | |
download | git-6a8989709efbd6d5187005497907264fde026ae9.tar.gz |
Merge branch 'rs/commit-list-append'
There is no need for "commit_list_reverse()" function that only invites
inefficient code.
By René Scharfe
* rs/commit-list-append:
commit: remove commit_list_reverse()
revision: append to list instead of insert and reverse
sequencer: export commit_list_append()
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c index e0e80f13ef..935e7a7ba4 100644 --- a/revision.c +++ b/revision.c @@ -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); |