Skip to content

Commit 0a2a979

Browse files
Martin von Zweigbergkpaulusmack
authored andcommitted
gitk: Fix "blame parent commit" with separate work tree
Running "blame parent commit" currently brings up an empty blame view 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 9b6adf3 commit 0a2a979

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
@@ -3557,7 +3557,7 @@ proc make_relative {f} {
35573557
}
35583558

35593559
proc external_blame {parent_idx {line {}}} {
3560-
global flist_menu_file gitdir
3560+
global flist_menu_file cdup
35613561
global nullid nullid2
35623562
global parentlist selectedline currentid
35633563

@@ -3576,7 +3576,7 @@ proc external_blame {parent_idx {line {}}} {
35763576
if {$line ne {} && $line > 1} {
35773577
lappend cmdline "--line=$line"
35783578
}
3579-
set f [file join [file dirname $gitdir] $flist_menu_file]
3579+
set f [file join $cdup $flist_menu_file]
35803580
# Unfortunately it seems git gui blame doesn't like
35813581
# being given an absolute path...
35823582
set f [make_relative $f]

0 commit comments

Comments
 (0)