[CRIU] [PATCH 1/2] use `git describe` for GITID
Tycho Andersen
tycho.andersen at canonical.com
Wed Apr 15 10:46:38 PDT 2015
`git describe` outputs slightly more useful git version info: v1.5-132-ga10f39e
The motivation for this is that we'd like to begin enforcing criu version in
liblxc, but we'd like to enable people to use the git version of 1.6 (since
that has stuff like --ext-mount-map auto), which reports its version as 1.5 but
doesn't tell us the patchlevel as git describe does.
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
scripts/Makefile.version | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.version b/scripts/Makefile.version
index f496357..53ee537 100644
--- a/scripts/Makefile.version
+++ b/scripts/Makefile.version
@@ -1,7 +1,7 @@
CRTOOLSVERSION := $(VERSION_MAJOR)$(if $(VERSION_MINOR),.$(VERSION_MINOR))$(if $(VERSION_SUBLEVEL),.$(VERSION_SUBLEVEL))
VERSION_HEADER := include/version.h
-GITID := $(shell if [ -d ".git" ]; then git reflog -n 1 | cut -f1 -d' '; fi)
+GITID := $(shell if [ -d ".git" ]; then git describe; fi)
ifeq ($(GITID),)
GITID := 0
endif
--
2.1.4
More information about the CRIU
mailing list