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

[PATCH 6/6] Change gitk so that it uses --topo-order rather than --merge-order

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

This change is made so that gitk --all produces the same result for every user irrespective of whether git-rev-parse --all produces the same result for every user. By using --topo-order rather than --merge-order this can be guaranteed and the existing (non-timestamp dependent) behaviour of --merge-order can be maintained.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
Paul, could you review this patch and if you agree, ack it.

The rationale for changing gitk to use --topo-order is that git-rev-list will produce the same order for --topo-order irrespective of the order of the start list, whereas git-rev-list --merge-order produces an order that is deliberately sensitive to the order of the start list.

Linus wants gitk --all to behave the same way, irrespective of what order git-rev-parse --all produces its output. I want --merge-order to keep its existing behaviour, so we agreed on this compromise whereby gitk uses --topo-order rather than --merge-order by default.

My understanding of your code is that you only expect a minimal topological ordering guarantee and the ordering produced by --topo-order should be sufficient for your needs - that is, you don't rely on the other aspect of the --merge-order invariant.

I'll leave it to you and Linus to decide how you want to manage the merge between your HEAD and Linus'. ---

 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ff2ca5764029d451f2a728845dad12c4e950fae1
diff --git a/gitk b/gitk
--- a/gitk
+++ b/gitk
@@ -37,7 +37,7 @@ proc getcommits {rargs} {
 	set parsed_args $rargs
     }
     if [catch {
-	set commfd [open "|git-rev-list --header --merge-order $parsed_args" r]
+	set commfd [open "|git-rev-list --header --topo-order $parsed_args" r]
     } err] {
 	puts stderr "Error executing git-rev-list: $err"
 	exit 1
------------
Message 1 of 1 in “Change gitk so that it uses --topo-order rather than --merge-order”
  1. 6/6 Change gitk so that it uses --topo-order rather than --merge-orderJon 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.