Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Seymour <jon.seymour@gmail.com>2005-07-07 04:59:13 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 05:03:53 +0400
commita7336ae514738f159dad314d6674961427f043a6 (patch)
tree248f72f3e4dcb40693488b0c06f93d0b38122b8e /rev-list.c
parent28346d2d3c6e609a618c6c429d865e9d5d50b998 (diff)
[PATCH] Ensure list insertion method does not depend on position of --merge-order argument
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>
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rev-list.c b/rev-list.c
index 0dd45129e6..dfa0933825 100644
--- 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];
@@ -463,7 +461,6 @@ int main(int argc, char **argv)
}
if (!strcmp(arg, "--merge-order")) {
merge_order = 1;
- insert = commit_list_insert;
continue;
}
if (!strcmp(arg, "--show-breaks")) {
@@ -490,10 +487,11 @@ int main(int argc, char **argv)
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)