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

Submitted by Eduardo Lima (Etrunko) on April 29, 2016, 7:32 p.m.


Message ID 1461958341-11359-3-git-send-email-etrunko@redhat.com
State New
Headers show
Series "Fixes to git-version-gen" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Eduardo Lima (Etrunko) April 29, 2016, 7:32 p.m.
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

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

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

Patch hide | download patch | download mbox

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-/'`;
-elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
+elif test "x$fallback" = x; then