summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-04-04 22:14:13 -0400
committerPaul Mackerras <paulus@samba.org>2011-07-24 15:34:54 +1000
commit9b6adf343350891384fef7252eefb404d0fee090 (patch)
tree327cc6909948c945b6270d4380a94b87b70fab45
parentc332f44514375fd8e70da2c347b7bb8f2bd240f4 (diff)
downloadgit-9b6adf343350891384fef7252eefb404d0fee090.tar.gz
gitk: Fix "show origin of this line" with separate work tree
Running "show origin of this line" currently fails when the the work tree is not the parent of the git directory. Fix it by feeding git-blame paths relative to $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>
-rwxr-xr-xgitk4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitk b/gitk
index a1aec6202f..4c99dd601a 100755
--- a/gitk
+++ b/gitk
@@ -3589,7 +3589,7 @@ proc external_blame {parent_idx {line {}}} {
proc show_line_source {} {
global cmitmode currentid parents curview blamestuff blameinst
global diff_menu_line diff_menu_filebase flist_menu_file
- global nullid nullid2 gitdir
+ global nullid nullid2 gitdir cdup
set from_index {}
if {$cmitmode eq "tree"} {
@@ -3642,7 +3642,7 @@ proc show_line_source {} {
} else {
lappend blameargs $id
}
- lappend blameargs -- [file join [file dirname $gitdir] $flist_menu_file]
+ lappend blameargs -- [file join $cdup $flist_menu_file]
if {[catch {
set f [open $blameargs r]
} err]} {