summaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2007-01-09 21:26:52 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-09 16:14:41 -0800
commit3fe71f3a6f4454e845d4c7aec3e4bddd9a872b15 (patch)
tree99c02617bfd8f23fd04cadb7cf4a3692c0b9a06a /git-clone.sh
parentd234b21c6966ee1d2dc4b5dcd9dca73a102bc442 (diff)
downloadgit-3fe71f3a6f4454e845d4c7aec3e4bddd9a872b15.tar.gz
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>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 3d388de62a..cf761b2c69 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -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/^\.\///'
) | (