threads / patch / 14203

patchGIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy

Subject: [PATCH] GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy

## tl;dr

One message between Jun 28, 2008 and Jun 28, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Lea Wiemann· Jun 28, 2008, 17:13 UTC · lore
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
---
I had a created a "HEAD" file for test purposes (to see under what
conditions commands would fail).  This patch allows git to still be
built even if such a file exists.
 GIT-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to GIT-VERSION-GEN +1 −1
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index f221447..cb7cd4b 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -16,7 +16,7 @@ elif test -d .git -o -f .git &&
 	case "$VN" in
 	*$LF*) (exit 1) ;;
 	v[0-9]*)
-		test -z "$(git diff-index --name-only HEAD)" ||
+		test -z "$(git diff-index --name-only HEAD --)" ||
 		VN="$VN-dirty" ;;
 	esac
 then
-- 
1.5.6.1.205.g55df3e

← back to recent threads