git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
LWLea Wiemann <lewiemann@gmail.com>
Date
Jun 28, 2008, 17:13 UTC
Message-ID
<1214673209-20498-1-git-send-email-LeWiemann@gmail.com>
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(-)
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
Message 1 of 1 in “GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy”
  1. GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copyLea Wiemann, Jun 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.