DORMANTno replies

[PATCH 3/7] Fixes problem with --merge-order head ^head

From: Jon Seymour <hidden>
Date: 2016-06-15 22:42:00
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

 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.
------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help