git-clone: Make sure the master branch exists before running cat on it.
Otherwise we get an error like this on stderr: cat: [...]/.git/refs/remotes/origin/master: No such file or directory which makes it look like git-clone failed. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
d234b21c69
commit
3fe71f3a6f
@ -355,7 +355,7 @@ then
|
||||
# The name under $remote_top the remote HEAD seems to point at.
|
||||
head_points_at=$(
|
||||
(
|
||||
echo "master"
|
||||
test -f "$GIT_DIR/$remote_top/master" && echo "master"
|
||||
cd "$GIT_DIR/$remote_top" &&
|
||||
find . -type f -print | sed -e 's/^\.\///'
|
||||
) | (
|
||||
|
Loading…
Reference in New Issue
Block a user