Skip to content

Commit

Permalink
git-gui: Don't prepend the prefix if value looks like a full path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Wong authored and Pat Thoyts committed Oct 17, 2012
1 parent e3d06ca commit df46eda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}} {
Expand Down

0 comments on commit df46eda

Please sign in to comment.