From b1ba39e7e80cdee3e7c1c80334cd9aa87b9b7b69 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 8 Aug 2005 20:04:20 -0700 Subject: [PATCH] "Child" information in commit window - and cleanups This adds "Child: " lines to the commit window, which tells what children a commit has. It also cleans things up: it marks the text widget as no-wrap, which means that it doesn't need to truncate the commit description arbitrarily by hand. Also, the description itself is now done by a common helper routine that handles both the parent and the children. Signed-off-by: Linus Torvalds Signed-off-by: Paul Mackerras diff --git a/gitk b/gitk index edf94bf..1bc0d88 100755 --- a/gitk +++ b/gitk @@ -387,7 +387,7 @@ proc makewindow {} { set ctext .ctop.cdet.left.ctext text $ctext -bg white -state disabled -font $textfont \ -width $geometry(ctextw) -height $geometry(ctexth) \ - -yscrollcommand ".ctop.cdet.left.sb set" + -yscrollcommand ".ctop.cdet.left.sb set" -wrap none scrollbar .ctop.cdet.left.sb -command "$ctext yview" pack .ctop.cdet.left.sb -side right -fill y pack $ctext -side left -fill both -expand 1 @@ -1704,10 +1704,19 @@ proc selcanvline {w x y} { selectline $l 1 } +proc commit_descriptor {p} { + global commitinfo + set l "..." + if {[info exists commitinfo($p)]} { + set l [lindex $commitinfo($p) 0] + } + return "$p ($l)" +} + proc selectline {l isnew} { global canv canv2 canv3 ctext commitinfo selectedline global lineid linehtag linentag linedtag - global canvy0 linespc parents nparents + global canvy0 linespc parents nparents children nchildren global cflist currentid sha1entry global commentend idtags idline @@ -1790,15 +1799,15 @@ proc selectline {l isnew} { set commentstart [$ctext index "end - 1c"] set comment {} - foreach p $parents($id) { - set l "..." - if {[info exists commitinfo($p)]} { - set l [lindex $commitinfo($p) 0] - if {[string length $l] > 32} { - set l "[string range $l 0 28] ..." - } + if {[info exists parents($id)]} { + foreach p $parents($id) { + append comment "Parent: [commit_descriptor $p]\n" + } + } + if {[info exists children($id)]} { + foreach c $children($id) { + append comment "Child: [commit_descriptor $c]\n" } - append comment "Parent: $p ($l)\n" } append comment "\n" append comment [lindex $info 5] -- cgit v0.10.2-6-g49f6 From 93b5fcdd8ddaa7f55ce1a43d8b9eaed1d5febc98 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 9 Aug 2005 10:16:12 -0700 Subject: Downgrade git-send-email-script RPM folks have problem installing the package otherwise. Since its usefulness does have much to do with GIT, downgrade it to "contrib" status for now. We may want to move it to contrib/ subdirectory after auditing other programs when we reorganize the source tree. Signed-off-by: Junio C Hamano diff --git a/Makefile b/Makefile index 3335d1a..c14ec4f 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \ git-request-pull-script git-bisect-script SCRIPTS += git-count-objects-script -SCRIPTS += git-send-email-script +# SCRIPTS += git-send-email-script PROG= git-update-cache git-diff-files git-init-db git-write-tree \ git-read-tree git-commit-tree git-cat-file git-fsck-cache \ -- cgit v0.10.2-6-g49f6