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

[GITK PATCH] gitk: fix direction of --left-right triangles

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 1, 2009, 12:47 UTC
Message-ID
<0fd5fc0f09779bb04c02b54d6ec8f43087a51bca.1249130587.git.trast@student.ethz.ch>

c961b22 (gitk: Use git log and add support for --left-right, 2007-07-09) introduced --left-right support to gitk, but right from the start, 'gitk --left-right A...B' oriented the triangles the wrong way: commits coming from A had a triangle to the right, and vice versa. To fix this, we simply swap the triangles. (Note that git-log does it right.)

Noticed-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
Sorry for the double mail, I forgot to Cc the list in the first mail.
 gitk |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gitk b/gitk
index 4604c83..5be2a76 100755
--- a/gitk
+++ b/gitk
@@ -5689,16 +5689,16 @@ proc drawcmittext {id row col} {
     } elseif {$listed == 3} {
 	# triangle pointing left for left-side commits
 	set t [$canv create polygon \
-		   [expr {$x - $orad}] $y \
-		   [expr {$x + $orad - 1}] [expr {$y - $orad}] \
-		   [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
+		   [expr {$x + $orad - 1}] $y \
+		   [expr {$x - $orad}] [expr {$y - $orad}] \
+		   [expr {$x - $orad}] [expr {$y + $orad - 1}] \
 		   -fill $ofill -outline $fgcolor -width 1 -tags circle]
     } else {
 	# triangle pointing right for right-side commits
 	set t [$canv create polygon \
-		   [expr {$x + $orad - 1}] $y \
-		   [expr {$x - $orad}] [expr {$y - $orad}] \
-		   [expr {$x - $orad}] [expr {$y + $orad - 1}] \
+		   [expr {$x - $orad}] $y \
+		   [expr {$x + $orad - 1}] [expr {$y - $orad}] \
+		   [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
 		   -fill $ofill -outline $fgcolor -width 1 -tags circle]
     }
     set circleitem($row) $t
-- 
1.6.4.214.gb5b94
Next: Thomas Rast
Message 1 of 4 in “gitk: fix direction of --left-right triangles”
  1. gitk: fix direction of --left-right trianglesThomas Rast, Aug 1, 2009
  2. gitk: fix direction of symmetric difference in optimized modeThomas Rast, Aug 5, 2009
  3. Thomas RastAug 6, 2009
  4. Simplify away duplicate commits with --cherry-pick --parentsThomas Rast, Aug 8, 2009

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.