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

Re: bug: build from tarball uses git-describe

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 14, 2007, 01:00 UTC
Message-ID
<Pine.LNX.4.63.0702140159440.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<eqtfso$7mo$1@sea.gmane.org>
Hi,
On Tue, 13 Feb 2007, Han-Wen Nienhuys wrote:
Show 5 quoted lines
> apparently, the makefile blindly uses the output of 
> 
>   git describe 
> 
> without checking whether there is a .git directory.
Does this (totally untested) patch help?
--
 GIT-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 7a10b60..e6f89cb 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -8,7 +8,7 @@ LF='
 
 # First try git-describe, then see if there is a version file
 # (included in release tarballs), then default
-if VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
+if test -d .git && VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
    case "$VN" in
    *$LF*) (exit 1) ;;
    v[0-9]*) : happy ;;
Previous: Han-Wen NienhuysNext: Junio C Hamano
Message 2 of 6 in “bug: build from tarball uses git-describe”
  1. Han-Wen NienhuysFeb 13, 2007
  2. Johannes SchindelinFeb 14, 2007
  3. Junio C HamanoFeb 14, 2007
  4. Johannes SchindelinFeb 14, 2007
  5. Junio C HamanoFeb 14, 2007
  6. Johannes SchindelinFeb 14, 2007

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.