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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]