{"thread":{"id":"6314","subject":"[PATCH] git-clone: Make sure the master branch exists before running cat on it.","startedAt":"2007-01-09T20:26:52Z","lastAt":"2007-01-09T20:26:52Z","messageCount":1,"participants":["Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31277","messageId":"87bql80wvn.fsf@wine.dyndns.org","threadId":"6314","inReplyTo":null,"subject":"[PATCH] git-clone: Make sure the master branch exists before running cat on it.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2007-01-09T20:26:52Z","receivedAt":"2007-01-09T20:26:52Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"Otherwise we get an error like this on stderr:\n\n  cat: [...]/.git/refs/remotes/origin/master: No such file or directory\n\nwhich makes it look like git-clone failed.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n---\n git-clone.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 3d388de..cf761b2 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -355,7 +355,7 @@ then\n \t# The name under $remote_top the remote HEAD seems to point at.\n \thead_points_at=$(\n \t\t(\n-\t\t\techo \"master\"\n+\t\t\ttest -f \"$GIT_DIR/$remote_top/master\" && echo \"master\"\n \t\t\tcd \"$GIT_DIR/$remote_top\" &&\n \t\t\tfind . -type f -print | sed -e 's/^\\.\\///'\n \t\t) | (\n-- \n1.4.4.4.g37ed\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"}]}