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

[PATCH 1/13] Temporary fixup to rev-list.c to restore expected order of arguments presented to --merge-order sort.

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jul 6, 2005, 16:39 UTC
Message-ID
<20050706163934.9811.qmail@blackcubes.dyndns.org>

This patch adds a hacky special case to the rev-list main to restore the order in which the --merge-order sort algorithm receives arguments.

A subsequent patch will abstract this out more cleanly.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 rev-list.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
c63fe4678d33db15db076606f7a133868e91f1bc
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -482,7 +482,10 @@ int main(int argc, char **argv)
 		commit = get_commit_reference(arg, flags);
 		if (!commit)
 			continue;
-		insert_by_date(&list, commit);
+		if (!merge_order) 
+			insert_by_date(&list, commit);
+		else 
+			commit_list_insert(commit, &list);
 	}
 
 	if (!merge_order) {		
------------
Message 1 of 1 in “Temporary fixup to rev-list.c to restore expected order of arguments presented to --merge-order sort.”
  1. 1/13 Temporary fixup to rev-list.c to restore expected order of arguments presented to --merge-order sort.Jon Seymour, Jul 6, 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.