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

[Ovirt-devel] avoid nonzero exit status from "make -f ovirt.mk status"



Perry Myers reported that "make -f ovirt.mk status" fails,
with output like this:

  # On branch next
  nothing to commit (working directory clean)
  # On branch next
  nothing to commit (working directory clean)
  # On branch next
  nothing to commit (working directory clean)
  # On branch next
  nothing to commit (working directory clean)
  # On branch next
  nothing to commit (working directory clean)
  # On branch next
  nothing to commit (working directory clean)
  make: *** [status] Error 1

That's because the failure of "git status" was leaking
out to the shell.  This fixes it:

>From 6a268df91ee1c88a541c37a9f725bf5f4aa96553 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Fri, 5 Sep 2008 18:09:56 +0200
Subject: [PATCH] * ovirt.mk (status): Ignore a nonzero exit status from git status.

---
 ovirt.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ovirt.mk b/ovirt.mk
index 78ee0f5..d94b280 100644
--- a/ovirt.mk
+++ b/ovirt.mk
@@ -46,7 +46,7 @@ bumpversion:
 status:
 	for dir in $(SUBDIRS); do \
 		if test -d $$dir ; then \
-			(cd $$dir && git $@) ; \
+			(cd $$dir && git $@) || :; \
 		fi ; \
 	done

--
1.6.0.1.196.g01914


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