summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70a5fc4)
raw | patch | inline | side by side (parent: 70a5fc4)
author | Markus Heidelberg <markus.heidelberg@web.de> | |
Tue, 3 Nov 2009 23:21:41 +0000 (00:21 +0100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sat, 14 Nov 2009 10:19:12 +0000 (21:19 +1100) |
When run in the top-level directory of a git repository, "git
rev-parse --git-dir" doesn't return an absolute path, but merely
".git", so the selected file for "git gui blame" has a relative path.
The function make_relative then tries to make the already relative
path relative, which results in a path like "../../../../Makefile"
with as many ".." as there are elements of [pwd].
This regression was introduced by commit 9712b81 (gitk: Fix bugs in
blaming code, 2008-12-06), which fixed "git gui blame" when called from
subdirs.
This also fixes it for bare repositories.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
rev-parse --git-dir" doesn't return an absolute path, but merely
".git", so the selected file for "git gui blame" has a relative path.
The function make_relative then tries to make the already relative
path relative, which results in a path like "../../../../Makefile"
with as many ".." as there are elements of [pwd].
This regression was introduced by commit 9712b81 (gitk: Fix bugs in
blaming code, 2008-12-06), which fixed "git gui blame" when called from
subdirs.
This also fixes it for bare repositories.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 5f065457633b592ab83df192ad4bcdb27c006111..d5f0a88d78784accc3c45bea4fd02f98428b09b7 100755 (executable)
--- a/gitk
+++ b/gitk
# Turn an absolute path into one relative to the current directory
proc make_relative {f} {
+ if {[file pathtype $f] eq "relative"} {
+ return $f
+ }
set elts [file split $f]
set here [file split [pwd]]
set ei 0