[gambit-list] [PATCH 5/6] makefile.in: give a warning if $(REMOTE)/master doesn't seem to exist

Christian Jaeger chrjae at gmail.com
Fri Apr 30 10:54:18 EDT 2010


Only output a warning (not stop execution), since the output from Git
is being thrown away (because it is so verbose), and if it would get
there because of another git error than that the branch doesn't exist,
we would stop for the wrong reason. Only outputting a warning should
be enough to help the user figure out what's going wrong and still be
safe.

(Question: does this work on all relevant platforms? Redirections are
unixy, but since the makefile seems to assume for sh to be available
anyway, maybe redirections are not a problem?)
---
 makefile.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/makefile.in b/makefile.in
index 30002c0..44e720a 100644
--- a/makefile.in
+++ b/makefile.in
@@ -145,6 +145,7 @@ push: fake_target
 
 pull: fake_target
 	@if test "$(RC)" = "$(GIT)"; then \
+	  $(GIT) rev-parse $(REMOTE)/master > /dev/null 2>&1 || { echo "WARNING: branch '$(REMOTE)/master' does not seem to exist; set the REMOTE environment variable to the name of the correct remote if it is not 'origin'"; }; \
 	  $(GIT) remote update $(REMOTE); \
 	else \
 	  $(HG) pull; \
-- 
1.7.0.3




More information about the Gambit-list mailing list