summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28346d2)
raw | patch | inline | side by side (parent: 28346d2)
author | Jon Seymour <jon.seymour@gmail.com> | |
Thu, 7 Jul 2005 00:59:13 +0000 (10:59 +1000) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Thu, 7 Jul 2005 01:03:53 +0000 (18:03 -0700) |
This change ensures that git-rev-list --merge-order produces the same result
irrespective of what position the --merge-order argument appears in the argument
list.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
irrespective of what position the --merge-order argument appears in the argument
list.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
rev-list.c | patch | blob | history |
diff --git a/rev-list.c b/rev-list.c
index 0dd45129e6678415f6578b4fc4a1234c6035fc77..dfa0933825c5afdcb35e15ee739ba12530fcc9ff 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
@@ -410,10 +410,8 @@ static struct commit *get_commit_reference(const char *name, unsigned int flags)
int main(int argc, char **argv)
{
struct commit_list *list = NULL;
- struct commit_list *(*insert)(struct commit *, struct commit_list **);
int i, limited = 0;
- insert = insert_by_date;
for (i = 1 ; i < argc; i++) {
int flags;
char *arg = argv[i];
}
if (!strcmp(arg, "--merge-order")) {
merge_order = 1;
- insert = commit_list_insert;
continue;
}
if (!strcmp(arg, "--show-breaks")) {
if (commit->object.flags & SEEN)
continue;
commit->object.flags |= SEEN;
- insert(commit, &list);
+ commit_list_insert(commit, &list);
}
if (!merge_order) {
+ sort_by_date(&list);
if (limited)
list = limit_list(list);
if (topo_order)