diff options
author | Andrew Wong <andrew.kw.w@gmail.com> | 2012-10-02 16:25:15 (GMT) |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2012-10-17 20:47:50 (GMT) |
commit | df46eda3887da7c31cbc3f278550fc8ef9d1ba7a (patch) | |
tree | 920e48024af697afdf43e9504bba12a31a64005f | |
parent | e3d06ca93eebaf5e4bf8438255a30fb6c91ab277 (diff) | |
download | git-df46eda3887da7c31cbc3f278550fc8ef9d1ba7a.zip git-df46eda3887da7c31cbc3f278550fc8ef9d1ba7a.tar.gz git-df46eda3887da7c31cbc3f278550fc8ef9d1ba7a.tar.bz2 |
git-gui: Don't prepend the prefix if value looks like a full path
When argument parsing fails to detect a file name, "git-gui" will try to
use the previously detected "head" as the file name. We should avoid
prepending the prefix if "head" looks like a full path.
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rwxr-xr-x | git-gui.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3037,8 +3037,13 @@ blame { unset is_path if {$head ne {} && $path eq {}} { - set path [normalize_relpath $_prefix$head] - set head {} + if {[string index $head 0] eq {/}} { + set path [normalize_relpath $head] + set head {} + } else { + set path [normalize_relpath $_prefix$head] + set head {} + } } if {$head eq {}} { |