summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a2a979)
raw | patch | inline | side by side (parent: 0a2a979)
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Tue, 5 Apr 2011 02:14:15 +0000 (22:14 -0400) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sun, 24 Jul 2011 05:34:54 +0000 (15:34 +1000) |
Running "External diff" to compare the index and work tree currently
brings up an empty blame view when the work tree is not the parent of
the git directory. This is because the file that is taken from the
work tree is assumed to be in
$GIT_DIR/../<repo-relative-file-name>. Fix it by feeding the diff tool
a path under $GIT_WORK_TREE instead of "$GIT_DIR/..".
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
brings up an empty blame view when the work tree is not the parent of
the git directory. This is because the file that is taken from the
work tree is assumed to be in
$GIT_DIR/../<repo-relative-file-name>. Fix it by feeding the diff tool
a path under $GIT_WORK_TREE instead of "$GIT_DIR/..".
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 862646779fbc59cdad41f904ee5bd11ef1adfcf2..5d150059df399153b09c62fdacc76fdf6df010cb 100755 (executable)
--- a/gitk
+++ b/gitk
proc external_diff_get_one_file {diffid filename diffdir} {
global nullid nullid2 nullfile
- global gitdir
+ global worktree
if {$diffid == $nullid} {
- set difffile [file join [file dirname $gitdir] $filename]
+ set difffile [file join $worktree $filename]
if {[file exists $difffile]} {
return $difffile
}
if {$isworktree} {
set cdup [exec git rev-parse --show-cdup]
}
+set worktree [exec git rev-parse --show-toplevel]
setcoords
makewindow
catch {