aboutsummaryrefslogtreecommitdiff
path: root/epoch.c
diff options
context:
space:
mode:
authorJon Seymour <jon.seymour@gmail.com>2005-06-20 12:29:31 +1000
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-19 20:13:18 -0700
commitd6bd56a0e2d710d17c9dc61cfc7fea1b8e3f4629 (patch)
treed028a41c0029e447a691c40824aa13585a641d27 /epoch.c
parent8cd1033e10b3d51d19676902bf522be15eb95751 (diff)
downloadgit-d6bd56a0e2d710d17c9dc61cfc7fea1b8e3f4629.tar.gz
git-d6bd56a0e2d710d17c9dc61cfc7fea1b8e3f4629.tar.xz
[PATCH] Fixes problem with --merge-order head ^head
git-rev-list --merge-order HEAD ^HEAD was faulting rather than generating an empty output. This patch fixes that problem. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'epoch.c')
-rw-r--r--epoch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epoch.c b/epoch.c
index 5b71ad50d..82becf677 100644
--- a/epoch.c
+++ b/epoch.c
@@ -606,7 +606,9 @@ int sort_list_in_merge_order(struct commit_list *list, emitter_func emitter)
}
}
- if (!reversed->next) {
+ if (!reversed)
+ return ret;
+ else if (!reversed->next) {
/*
* If there is only one element in the list, we can sort it
* using sort_in_merge_order.