summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-04-05 02:14:14 (GMT)
committerPaul Mackerras <paulus@samba.org>2011-07-24 05:34:54 (GMT)
commit0a2a979310c1ebc43d460fd8564981c9b3b99f07 (patch)
tree9f03f7629f256a9de09064d1fd3ea7e420ba458b
parent9b6adf343350891384fef7252eefb404d0fee090 (diff)
downloadgit-0a2a979310c1ebc43d460fd8564981c9b3b99f07.zip
git-0a2a979310c1ebc43d460fd8564981c9b3b99f07.tar.gz
git-0a2a979310c1ebc43d460fd8564981c9b3b99f07.tar.bz2
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 <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 4c99dd6..8626467 100755
--- a/gitk
+++ b/gitk
@@ -3557,7 +3557,7 @@ proc make_relative {f} {
}
proc external_blame {parent_idx {line {}}} {
- global flist_menu_file gitdir
+ global flist_menu_file cdup
global nullid nullid2
global parentlist selectedline currentid
@@ -3576,7 +3576,7 @@ proc external_blame {parent_idx {line {}}} {
if {$line ne {} && $line > 1} {
lappend cmdline "--line=$line"
}
- set f [file join [file dirname $gitdir] $flist_menu_file]
+ set f [file join $cdup $flist_menu_file]
# Unfortunately it seems git gui blame doesn't like
# being given an absolute path...
set f [make_relative $f]