Skip to content

Commit

Permalink
Old git bad
Browse files Browse the repository at this point in the history
  • Loading branch information
Siguza committed Dec 31, 2022
1 parent d9a7440 commit ac294f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif
# Submodules
# NOTE: Do not use &> or <<< here. Systems with annoying default shells will throw a fit if you do.
ifndef IGNORE_SUBMODULE_HEAD
UNSYNCED_SUBMODULES := $(shell git config --file .gitmodules --get-regexp path | awk '{ print $$2 }' | while read -r module; do commit="$$(git ls-tree --object-only HEAD "$$module")"; if [ -e "$$module/.git" ] && ! git --git-dir "$$module/.git" --work-tree "$$module" merge-base --is-ancestor "$$commit" HEAD; then printf '%s, ' "$$module"; fi; done | sed -E 's/, $$//')
UNSYNCED_SUBMODULES := $(shell git config --file .gitmodules --get-regexp path | awk '{ print $$2 }' | while read -r module; do commit="$$(git ls-tree HEAD "$$module" | awk '{ print $$3 }')"; if [ -e "$$module/.git" ] && ! git --git-dir "$$module/.git" --work-tree "$$module" merge-base --is-ancestor "$$commit" HEAD; then printf '%s, ' "$$module"; fi; done | sed -E 's/, $$//')
ifneq ($(UNSYNCED_SUBMODULES),)
$(error The following submodules are out of date: $(UNSYNCED_SUBMODULES). Either run "git submodule update" or set IGNORE_SUBMODULE_HEAD)
endif
Expand Down

0 comments on commit ac294f3

Please sign in to comment.