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>
Alexandre Julliard committed
Jan 9, 2007 at 21:26 UTC
3fe71f3a6f4454e845d4c7aec3e4bddd9a872b15
1 file changed
+1
-1
git-clone.sh
+1
-1
@@ -355,7 +355,7 @@ then
355
# The name under $remote_top the remote HEAD seems to point at.
356
head_points_at=$(
357
(
358
- echo "master"
358
+ test -f "$GIT_DIR/$remote_top/master" && echo "master"
359
cd "$GIT_DIR/$remote_top" &&
360
find . -type f -print | sed -e 's/^\.\///'
361
) | (