mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
Avoid running git command 254 times (#3915)
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
parent
c79558cc5a
commit
eb81457111
@ -32,10 +32,10 @@ DEBUG?=
|
|||||||
|
|
||||||
ifeq ($(HASH),)
|
ifeq ($(HASH),)
|
||||||
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
|
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
|
||||||
HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')
|
HASH:=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')
|
||||||
|
|
||||||
ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
|
ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
|
||||||
DIRTY=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
|
DIRTY:=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user