summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorMarcus Karlsson <mk@acc.umu.se>2011-10-04 20:08:13 (GMT)
committerPaul Mackerras <paulus@samba.org>2012-03-24 05:44:12 (GMT)
commitb2b76d10696d945bf19318831b64d009d119e051 (patch)
tree4aad03a1a271463714b85ad15782c7ca056fc437 /gitk
parent6febdede5acdbab192d955d4e0cd810f3fbee27f (diff)
downloadgit-b2b76d10696d945bf19318831b64d009d119e051.zip
git-b2b76d10696d945bf19318831b64d009d119e051.tar.gz
git-b2b76d10696d945bf19318831b64d009d119e051.tar.bz2
gitk: Teach gitk to respect log.showroot
In early days, all projects managed by git (except for git itself) had the product of a fairly mature development history in their first commit, and it was deemed unnecessary clutter to show additions of these thousands of paths as a patch. "git log" learned to show the patch for the initial commit without requiring --root command line option at 0f03ca9 (config option log.showroot to show the diff of root commits, 2006-11-23). Teach gitk to respect log.showroot. [paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the git config call] Signed-off-by: Marcus Karlsson <mk@acc.umu.se> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk10
1 files changed, 9 insertions, 1 deletions
diff --git a/gitk b/gitk
index d067492..651b740 100755
--- a/gitk
+++ b/gitk
@@ -7476,7 +7476,7 @@ proc addtocflist {ids} {
}
proc diffcmd {ids flags} {
- global nullid nullid2
+ global log_showroot nullid nullid2
set i [lsearch -exact $ids $nullid]
set j [lsearch -exact $ids $nullid2]
@@ -7510,6 +7510,9 @@ proc diffcmd {ids flags} {
lappend cmd HEAD
}
} else {
+ if {$log_showroot} {
+ lappend flags --root
+ }
set cmd [concat | git diff-tree -r $flags $ids]
}
return $cmd
@@ -11559,6 +11562,11 @@ catch {
}
}
+set log_showroot true
+catch {
+ set log_showroot [exec git config --bool --get log.showroot]
+}
+
if {[tk windowingsystem] eq "aqua"} {
set mainfont {{Lucida Grande} 9}
set textfont {Monaco 9}