提交 df46eda3 编写于 作者: A Andrew Wong 提交者: Pat Thoyts

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: NAndrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: NPat Thoyts <patthoyts@users.sourceforge.net>
上级 e3d06ca9
......@@ -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 {}} {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册