[Scummvm-git-logs] scummvm master -> b36386226e28bff830c5e9de8900b69ad464d530

sev- sev at scummvm.org
Tue Mar 16 22:22:49 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b36386226e BUILD: Use git describe --dirty for git 2.x


Commit: b36386226e28bff830c5e9de8900b69ad464d530
    https://github.com/scummvm/scummvm/commit/b36386226e28bff830c5e9de8900b69ad464d530
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-03-16T23:22:47+01:00

Commit Message:
BUILD: Use git describe --dirty for git 2.x

It is way faster than git update-index.

Changed paths:
    Makefile.common


diff --git a/Makefile.common b/Makefile.common
index 3e2d47e006..ebb4e5c8bc 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -251,10 +251,15 @@ endif
 ifneq ($(shell cd $(srcdir); git rev-parse --verify HEAD 1>/dev/null 2>&1 || echo "error"),error)
 GITROOT := $(srcdir)
 ifeq ($(origin VER_REV), undefined)
+GIT_VER_MAJOR = $(shell git --version | sed 's/^git version //' | cut -d. -f 1)
 # Are there uncommitted changes? (describe --dirty is only available since 1.6.6)
+ifeq ($(GIT_VER_MAJOR),1)
 VER_DIRTY := $(shell cd $(srcdir); git update-index --refresh --unmerged 1>/dev/null 2>&1; git diff-index --quiet HEAD || echo "-dirty")
+else
+GIT_DIRTY_FLAG = --dirty
+endif
 # Get the working copy base revision
-VER_REV := $(shell cd $(srcdir); git describe --long --match desc/\* | cut -d '-' -f 2-)$(VER_DIRTY)
+VER_REV := $(shell cd $(srcdir); git describe $(GIT_DIRTY_FLAG) --long --match desc/\* | cut -d '-' -f 2-)$(VER_DIRTY)
 endif
 else
 GITROOT := git://github.com/scummvm/scummvm.git




More information about the Scummvm-git-logs mailing list