diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2005-04-23 20:29:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-23 20:29:22 -0700 |
commit | 58e28af6a4d4d4faa1fa628e91c0b33c2b87aade (patch) | |
tree | 6f24c9b481d76e067d64bac1a8dbd5cf5d0dfb05 /commit.c | |
parent | 4056c09114e66ce3c2368551f0122e83628750d6 (diff) | |
download | git-58e28af6a4d4d4faa1fa628e91c0b33c2b87aade.tar.gz git-58e28af6a4d4d4faa1fa628e91c0b33c2b87aade.tar.xz |
[PATCH] Allow multiple date-ordered lists
Make pop_most_recent_commit() return the same objects multiple times, but only
if called with different bits to mark.
This is necessary to make merge-base work again.
Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -114,7 +114,8 @@ void sort_by_date(struct commit_list **list) *list = ret; } -struct commit *pop_most_recent_commit(struct commit_list **list) +struct commit *pop_most_recent_commit(struct commit_list **list, + unsigned int mark) { struct commit *ret = (*list)->item; struct commit_list *parents = ret->parents; @@ -125,8 +126,9 @@ struct commit *pop_most_recent_commit(struct commit_list **list) while (parents) { struct commit *commit = parents->item; - if (!commit->object.parsed) { - parse_commit(commit); + parse_commit(commit); + if (!(commit->object.flags & mark)) { + commit->object.flags |= mark; insert_by_date(list, commit); } parents = parents->next; |