[Spice-devel] [PATCH 2/3] Fix git-version-gen output if --fallback is specified

Eduardo Lima (Etrunko) etrunko at redhat.com
Fri Apr 29 19:32:20 UTC 2016


The output will use the value of fallback only if it is not empty *or*
the result of 'git --version' command is not 0. But the only reason I
can think of this command failing, is when the user does not have git
installed.

By removing the conditional it works every time. With or without git
installed.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
 build-aux/git-version-gen | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 6c56147..8d76e2a 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -188,7 +188,7 @@ then
     # Remove the "g" in git describe's output string, to save a byte.
     v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
     v_from_git=1
-elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
+elif test "x$fallback" = x; then
     v=UNKNOWN
 else
     v=$fallback
-- 
2.5.5



More information about the Spice-devel mailing list