git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jun 20, 2005, 02:29 UTC
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 <jon.seymour@gmail.com>
---
 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.
------------
Message 1 of 1 in “Fixes problem with --merge-order head ^head”
  1. 3/7 Fixes problem with --merge-order head ^headJon Seymour, Jun 20, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.