提交 09381b45 编写于 作者: J Julian Phillips 提交者: Junio C Hamano

new-workdir: handle rev-parse --git-dir not always giving full path

rev-parse --git-dir outputs a full path - except for the single case
of when the path would be $(pwd)/.git, in which case it outputs simply
.git.  Check for this special case and handle it.
Signed-off-by: NJulian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f58494bf
......@@ -24,6 +24,11 @@ git_dir=$(cd "$orig_git" 2>/dev/null &&
git rev-parse --git-dir 2>/dev/null) ||
die "\"$orig_git\" is not a git repository!"
if test "$git_dir" == ".git"
then
git_dir="$orig_git/.git"
fi
# don't link to a workdir
if test -L "$git_dir/config"
then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册