From d6bd56a0e2d710d17c9dc61cfc7fea1b8e3f4629 Mon Sep 17 00:00:00 2001 From: Jon Seymour Date: Mon, 20 Jun 2005 12:29:31 +1000 Subject: [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 5b71ad5..82becf6 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. -- cgit v0.10.2-6-g49f6