Skip to content

Commit 9b6adf3

Browse files
Martin von Zweigbergkpaulusmack
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent c332f44 commit 9b6adf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,7 +3589,7 @@ proc external_blame {parent_idx {line {}}} {
35893589
proc show_line_source {} {
35903590
global cmitmode currentid parents curview blamestuff blameinst
35913591
global diff_menu_line diff_menu_filebase flist_menu_file
3592-
global nullid nullid2 gitdir
3592+
global nullid nullid2 gitdir cdup
35933593

35943594
set from_index {}
35953595
if {$cmitmode eq "tree"} {
@@ -3642,7 +3642,7 @@ proc show_line_source {} {
36423642
} else {
36433643
lappend blameargs $id
36443644
}
3645-
lappend blameargs -- [file join [file dirname $gitdir] $flist_menu_file]
3645+
lappend blameargs -- [file join $cdup $flist_menu_file]
36463646
if {[catch {
36473647
set f [open $blameargs r]
36483648
} err]} {

0 commit comments

Comments
 (0)