[xen-tools-dev] [PATCH] harden git usage in Makefile
Stéphane Jourdois
sjourdois at gmail.com
Sat Jul 10 12:52:12 CEST 2010
1) 'git st' is an user alias.
2) 'git status' fails if in the middle of a commit (ie. local modified files).
'git ls-files' is more robust, use it in Makefile.
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index a996ca8..e3b2de1 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ DIST_PREFIX = ${TMP}
VERSION = 4.2beta1
DEBVERSION = $(shell echo $(VERSION)|sed 's/\(rc\|pre\|beta\|alpha\)/~\1/')
BASE = xen-tools
-VCS = $(shell if git st > /dev/null; then echo git; \
+VCS = $(shell if git ls-files > /dev/null; then echo git; \
elif hg st > /dev/null; then echo hg; \
else echo cannot-determine-used-vcs; fi)
--
1.5.6.5
More information about the xen-tools-dev
mailing list