Skip to content

Commit

Permalink
git-clone: Make sure the master branch exists before running cat on it.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Julliard authored and Junio C Hamano committed Jan 10, 2007
1 parent d234b21 commit 3fe71f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/^\.\///'
) | (
Expand Down

0 comments on commit 3fe71f3

Please sign in to comment.