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

Re: FFmpeg considering GIT

From
Junio C Hamano <junkio@cox.net>
Date
May 6, 2007, 07:49 UTC
Message-ID
<7vabwifl23.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<alpine.LFD.0.98.0705051524300.17381@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 7 quoted lines
>> and have the commits colored appropriately. That would be cool, but it 
>> might need more tcl/tk knowledge than I actually possess).
>
> Ok, that turned out to be the case.
>
> Here's an updated patch to gitk, which at least *parses* the 
> "--left-right" data properly, it just doesn't use it.
This on top of yours makes it use it.
 gitk |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/gitk b/gitk
index 0bf00ee..a6e762d 100755
--- a/gitk
+++ b/gitk
@@ -74,7 +74,7 @@ proc getcommits {} {
 proc getcommitlines {fd view}  {
     global commitlisted nextupdate
     global leftover commfd
-    global displayorder commitidx commitrow commitdata
+    global displayorder commitidx commitrow commitdata commitside
     global parentlist childlist children curview hlview
     global vparentlist vchildlist vdisporder vcmitlisted
 
@@ -178,6 +178,7 @@ proc getcommitlines {fd view}  {
 	}
 	set commitdata($id) [string range $cmit [expr {$j + 1}] end]
 	set commitrow($view,$id) $commitidx($view)
+	set commitside($id) $leftright
 	incr commitidx($view)
 	if {$view == $curview} {
 	    lappend parentlist $olds
@@ -2986,7 +2987,7 @@ proc drawlines {id} {
 
 proc drawcmittext {id row col rmx} {
     global linespc canv canv2 canv3 canvy0 fgcolor
-    global commitlisted commitinfo rowidlist
+    global commitlisted commitinfo commitside rowidlist
     global rowtextx idpos idtags idheads idotherrefs
     global linehtag linentag linedtag
     global mainfont canvxmax boldrows boldnamerows fgcolor
@@ -2995,9 +2996,29 @@ proc drawcmittext {id row col rmx} {
     set x [xc $row $col]
     set y [yc $row]
     set orad [expr {$linespc / 3}]
-    set t [$canv create oval [expr {$x - $orad}] [expr {$y - $orad}] \
-	       [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
-	       -fill $ofill -outline $fgcolor -width 1 -tags circle]
+
+    if {[info exists commitside($id)]} {
+	set leftright $commitside($id)
+    } else {
+	set leftright 0
+    }
+    if {$leftright == 0} {
+	set t [$canv create oval [expr {$x - $orad}] [expr {$y - $orad}] \
+		   [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \
+		   -fill $ofill -outline $fgcolor -width 1 -tags circle]
+    } elseif {$leftright < 0} {
+	set t [$canv create polygon \
+		   [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]
+    } else {
+	set t [$canv create polygon \
+		   [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]
+    }
     $canv raise $t
     $canv bind $t <1> {selcanvline {} %x %y}
     set xt [xc $row [llength [lindex $rowidlist $row]]]
Previous: Linus TorvaldsNext: Paul Mackerras
Message 35 of 66 in “FFmpeg considering GIT”
  1. Panagiotis IssarisMay 2, 2007
  2. Jakub NarebskiMay 2, 2007
  3. Petr BaudisMay 3, 2007
  4. Jakub NarebskiMay 4, 2007
  5. [RFC?] Telling git about more complex relationships between commits (Was: Re: FFmpeg considering GIT)Johan Herland, May 4, 2007
  6. Alex RiesenMay 4, 2007
  7. Andy ParkinsMay 4, 2007
  8. Andrew RuderMay 4, 2007
  9. Johan HerlandMay 4, 2007
  10. Johan HerlandMay 4, 2007
  11. Alex RiesenMay 4, 2007
  12. Johan HerlandMay 5, 2007
  13. Alex RiesenMay 5, 2007
  14. Johan HerlandMay 5, 2007
  15. Petr BaudisMay 4, 2007
  16. Johan HerlandMay 4, 2007
  17. Martin LanghoffMay 3, 2007
  18. Uwe Kleine-KönigMay 3, 2007
  19. Petr BaudisMay 3, 2007
  20. david@lang.hmMay 3, 2007
  21. Petr BaudisMay 3, 2007
  22. Michael NiedermayerMay 4, 2007
  23. Andy ParkinsMay 4, 2007
  24. Johannes SixtMay 4, 2007
  25. Florian WeimerMay 4, 2007
  26. Nicolas PitreMay 4, 2007
  27. Carl WorthMay 4, 2007
  28. Johan HerlandMay 4, 2007
  29. Michael NiedermayerMay 4, 2007
  30. Linus TorvaldsMay 5, 2007
  31. Karl HasselströmMay 5, 2007
  32. Linus TorvaldsMay 5, 2007
  33. Linus TorvaldsMay 5, 2007
  34. Linus TorvaldsMay 5, 2007
  35. Junio C HamanoMay 6, 2007
  36. Paul MackerrasMay 7, 2007
  37. Karl HasselströmMay 7, 2007
  38. Johan HerlandMay 7, 2007
  39. Alex RiesenMay 7, 2007
  40. Marco CostalbaMay 8, 2007
  41. Paul MackerrasMay 9, 2007
  42. Marco CostalbaMay 9, 2007
  43. Robin RosenbergMay 9, 2007
  44. Jan HudecMay 9, 2007
  45. Fredrik KuivinenMay 9, 2007
  46. Jan HudecMay 9, 2007
  47. Marco CostalbaMay 10, 2007
  48. Jan HudecMay 10, 2007
  49. Jan HudecMay 7, 2007
  50. Gábor FarkasMay 7, 2007
  51. Randal L. SchwartzMay 7, 2007
  52. Junio C HamanoMay 7, 2007
  53. Shawn O. PearceMay 8, 2007
  54. Jeff KingMay 8, 2007
  55. Karl HasselströmMay 6, 2007
  56. Karl HasselströmMay 6, 2007
  57. Linus TorvaldsMay 6, 2007
  58. Marco CostalbaMay 6, 2007
  59. Karl HasselströmMay 6, 2007
  60. Marco CostalbaMay 6, 2007
  61. Karl HasselströmMay 6, 2007
  62. Marco CostalbaMay 6, 2007
  63. Karl HasselströmMay 6, 2007
  64. Karl HasselströmMay 6, 2007
  65. Pavel RoskinMay 9, 2007
  66. Gábor FarkasMay 8, 2007

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.