{"thread":{"id":"14203","subject":"[PATCH] GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy","startedAt":"2008-06-28T17:13:29Z","lastAt":"2008-06-28T17:13:29Z","messageCount":1,"participants":["Lea Wiemann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"81569","messageId":"1214673209-20498-1-git-send-email-LeWiemann@gmail.com","threadId":"14203","inReplyTo":null,"subject":"[PATCH] GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-28T17:13:29Z","receivedAt":"2008-06-28T17:13:29Z","isPatch":true,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>\n---\nI had a created a \"HEAD\" file for test purposes (to see under what\nconditions commands would fail).  This patch allows git to still be\nbuilt even if such a file exists.\n\n GIT-VERSION-GEN |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\nindex f221447..cb7cd4b 100755\n--- a/GIT-VERSION-GEN\n+++ b/GIT-VERSION-GEN\n@@ -16,7 +16,7 @@ elif test -d .git -o -f .git &&\n \tcase \"$VN\" in\n \t*$LF*) (exit 1) ;;\n \tv[0-9]*)\n-\t\ttest -z \"$(git diff-index --name-only HEAD)\" ||\n+\t\ttest -z \"$(git diff-index --name-only HEAD --)\" ||\n \t\tVN=\"$VN-dirty\" ;;\n \tesac\n then\n-- \n1.5.6.1.205.g55df3e\n"}]}