summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-06-21 04:44:16 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-09 00:54:47 (GMT)
commita840566770c262f76e8fd7fb69239fbedd10b259 (patch)
tree3b8746d532eae99cb53fb6d965b195ffa8b1dd3c /lib
parentd696702209dd0d4c20d2b87b5bc10cae3d54e839 (diff)
downloadgit-a840566770c262f76e8fd7fb69239fbedd10b259.zip
git-a840566770c262f76e8fd7fb69239fbedd10b259.tar.gz
git-a840566770c262f76e8fd7fb69239fbedd10b259.tar.bz2
git-gui: use "blame -w -C -C" for "where did it come from, originally?"
The blame window shows "who wrote the piece originally" and "who moved it there" in two columns. In order to identify the former more correctly, it helps to use the new -w option. [sp: Minor change to only enable -w if underlying git >= 1.5.3] Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/blame.tcl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 77abd82..dcdb11b 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -33,6 +33,13 @@ variable group_colors {
#ececec
}
+# Switches for original location detection
+#
+variable original_options [list -C -C]
+if {[git-version >= 1.5.3]} {
+ lappend original_options -w ; # ignore indentation changes
+}
+
# Current blame data; cleared/reset on each load
#
field commit ; # input commit to blame
@@ -512,6 +519,7 @@ method _exec_blame {cur_w cur_d options cur_s} {
method _read_blame {fd cur_w cur_d cur_s} {
upvar #0 $cur_d line_data
variable group_colors
+ variable original_options
if {$fd ne $current_fd} {
catch {close $fd}
@@ -681,7 +689,7 @@ method _read_blame {fd cur_w cur_d cur_s} {
close $fd
if {$cur_w eq $w_asim} {
_exec_blame $this $w_amov @amov_data \
- [list -M -C -C] \
+ $original_options \
{ original location}
} else {
set current_fd {}