qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [RFC PATCH] scripts/qemu-version.sh: Always describe tag version
Date: Thu, 24 Sep 2020 18:35:09 +0200	[thread overview]
Message-ID: <20200924163509.142565-1-f4bug@amsat.org> (raw)

I'm not sure why sometime I get this error:

  $ make
  Generating qemu-version.h with a meson_exe.py custom command
  fatal: No tags can describe 'dc9f825f99eb5dc82f127e6c95fbe3a503e11346'.
  Try --always, or create some tags.

While to --always option is not clear in GIT-DESCRIBE(1):

   --always
       Show uniquely abbreviated commit object as fallback.

using it works and fix my builds:

  $ git describe --match 'v*' --dirty --always
  dc9f825f99e-dirty

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 scripts/qemu-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
index 03128c56a2c..a7135511588 100755
--- a/scripts/qemu-version.sh
+++ b/scripts/qemu-version.sh
@@ -9,7 +9,7 @@ version="$3"
 if [ -z "$pkgversion" ]; then
     cd "$dir"
     if [ -e .git ]; then
-        pkgversion=$(git describe --match 'v*' --dirty | echo "")
+        pkgversion=$(git describe --match 'v*' --dirty --always | echo "")
     fi
 fi
 
-- 
2.26.2



             reply	other threads:[~2020-09-24 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 16:35 Philippe Mathieu-Daudé [this message]
2020-10-05 17:01 ` [RFC PATCH] scripts/qemu-version.sh: Always describe tag version 罗勇刚(Yonggang Luo)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200924163509.142565-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).