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>

Martin von Zweigbergk committed Apr 4, 2011 at 22:14 UTC 9b6adf343350891384fef7252eefb404d0fee090
1 file changed +2 -2
gitk
+2 -2
@@ -3589,7 +3589,7 @@ proc external_blame {parent_idx {line {}}} {
3589 proc show_line_source {} {
3590 global cmitmode currentid parents curview blamestuff blameinst
3591 global diff_menu_line diff_menu_filebase flist_menu_file
3592 - global nullid nullid2 gitdir
3592 + global nullid nullid2 gitdir cdup
3593
3594 set from_index {}
3595 if {$cmitmode eq "tree"} {
@@ -3642,7 +3642,7 @@ proc show_line_source {} {
3642 } else {
3643 lappend blameargs $id
3644 }
3645 - lappend blameargs -- [file join [file dirname $gitdir] $flist_menu_file]
3645 + lappend blameargs -- [file join $cdup $flist_menu_file]
3646 if {[catch {
3647 set f [open $blameargs r]
3648 } err]} {