From: Jon Seymour Date: Mon, 20 Jun 2005 02:29:31 +0000 (+1000) Subject: [PATCH] Fixes problem with --merge-order head ^head X-Git-Tag: v0.99~238 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d6bd56a0e2d710d17c9dc61cfc7fea1b8e3f4629;p=git.git [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 Signed-off-by: Linus Torvalds --- 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.