threads / patch / 983

patch, 7 partsFixes problem with --merge-order head ^head

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

## tl;dr

One message between Jun 20, 2005 and Jun 20, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jon Seymour· Jun 20, 2005, 02:29 UTC · lore
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>
---
 epoch.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Show changes to epoch.c +3 −1
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.
------------

← back to recent threads