From: Jon Seymour Date: Mon, 20 Jun 2005 02:29:31 GMT Subject: [PATCH 3/7] Fixes problem with --merge-order head ^head Message-ID: <20050620022931.28578.qmail@blackcubes.dyndns.org> 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 --- epoch.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/epoch.c b/epoch.c --- a/epoch.c +++ b/epoch.c @@ -606,7 +606,9 @@ int sort_list_in_merge_order(struct comm } } - 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. ------------