summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbc0e7a)
raw | patch | inline | side by side (parent: fbc0e7a)
author | Alexander Gavrilov <angavrilov@gmail.com> | |
Wed, 16 Jul 2008 20:43:48 +0000 (00:43 +0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 17 Jul 2008 02:09:28 +0000 (22:09 -0400) |
On huge repositories, -C -C can be way too slow to be
unconditionally enabled, and it can also be useful to control
its precision.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
unconditionally enabled, and it can also be useful to control
its precision.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history | |
lib/blame.tcl | patch | blob | history | |
lib/option.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index e3b6669880f79eaaf6cf6cc91e70971a08d72e7b..b1ed0ec5681ea78fb5ece8393604760fb302214f 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
set default_config(gui.matchtrackingbranch) false
set default_config(gui.pruneduringfetch) false
set default_config(gui.trustmtime) false
+set default_config(gui.fastcopyblame) false
+set default_config(gui.copyblamethreshold) 40
set default_config(gui.diffcontext) 5
set default_config(gui.commitmsgwidth) 75
set default_config(gui.newbranchtemplate) {}
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 92fac1bad402a0d7772af0b8817217555b61b6c7..192505d983030c04f2153de9ac33709663fca7f1 100644 (file)
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
#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
method _read_blame {fd cur_w cur_d} {
upvar #0 $cur_d line_data
variable group_colors
- variable original_options
if {$fd ne $current_fd} {
catch {close $fd}
if {[eof $fd]} {
close $fd
if {$cur_w eq $w_asim} {
+ # Switches for original location detection
+ set threshold [get_config gui.copyblamethreshold]
+ set original_options [list "-C$threshold"]
+
+ if {![is_config_true gui.fastcopyblame]} {
+ # thorough copy search; insert before the threshold
+ set original_options [linsert $original_options 0 -C]
+ }
+ if {[git-version >= 1.5.3]} {
+ lappend original_options -w ; # ignore indentation changes
+ }
+
_exec_blame $this $w_amov @amov_data \
$original_options \
[mc "Loading original location annotations..."]
diff --git a/lib/option.tcl b/lib/option.tcl
index 9270512582034a6629c4ff15abb1f30889f76903..ffb3f00ff0a992254804cc047b5a63ce82aa5bd9 100644 (file)
--- a/lib/option.tcl
+++ b/lib/option.tcl
{b gui.trustmtime {mc "Trust File Modification Timestamps"}}
{b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
+ {b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
+ {i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}