summaryrefslogtreecommitdiff
path: root/git-gui/lib/blame.tcl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-02 16:28:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-02 16:28:30 (GMT)
commitc01a29c74ff991faf3012882fbf676b182b8893f (patch)
treeaea256176929d2bc66f77fde7dad2f7d7298154e /git-gui/lib/blame.tcl
parentac2e1e632e50c682305fee902b32b1a23ce71546 (diff)
parent2810a58dba6d06f4d1816fb06500c117feebd830 (diff)
downloadgit-c01a29c74ff991faf3012882fbf676b182b8893f.zip
git-c01a29c74ff991faf3012882fbf676b182b8893f.tar.gz
git-c01a29c74ff991faf3012882fbf676b182b8893f.tar.bz2
Merge git://repo.or.cz/git-gui into pt/git-gui
* git://repo.or.cz/git-gui: git-gui: fix size and position of window panes on startup git-gui: mc cannot be used before msgcat has been loaded git-gui: use textconv filter for diff and blame git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32 git-gui: fix shortcut creation on cygwin git-gui: fix PATH environment for mingw development environment git-gui: fix usage of _gitworktree when creating shortcut for windows git-gui: fix "Explore Working Copy" for Windows again git-gui: fix usage of themed widgets variable git-gui: Handle failure of core.worktree to identify the working directory. git-gui: check whether systems nice command works or disable it
Diffstat (limited to 'git-gui/lib/blame.tcl')
-rw-r--r--git-gui/lib/blame.tcl21
1 files changed, 19 insertions, 2 deletions
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 786b50b..2137ec9 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -449,11 +449,28 @@ method _load {jump} {
$status show [mc "Reading %s..." "$commit:[escape_path $path]"]
$w_path conf -text [escape_path $path]
+
+ set do_textconv 0
+ if {![is_config_false gui.textconv] && [git-version >= 1.7.2]} {
+ set filter [gitattr $path diff set]
+ set textconv [get_config [join [list diff $filter textconv] .]]
+ if {$filter ne {set} && $textconv ne {}} {
+ set do_textconv 1
+ }
+ }
if {$commit eq {}} {
- set fd [open $path r]
+ if {$do_textconv ne 0} {
+ set fd [open |[list $textconv $path] r]
+ } else {
+ set fd [open $path r]
+ }
fconfigure $fd -eofchar {}
} else {
- set fd [git_read cat-file blob "$commit:$path"]
+ if {$do_textconv ne 0} {
+ set fd [git_read cat-file --textconv "$commit:$path"]
+ } else {
+ set fd [git_read cat-file blob "$commit:$path"]
+ }
}
fconfigure $fd \
-blocking 0 \