[scripts/submodules] Add branch to check if fetch is needed
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 21 Jun 2016 01:03:07 +0000 (03:03 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 21 Jun 2016 01:03:07 +0000 (03:03 +0200)
In some cases the "git log -1 <remote>" check fails even though the remote is configured
and an unnecessary fetch is done. Adding the branch to the check fixes this.

scripts/submodules/versions.mk

index 440476df14051541e61639f3cc2d381c8b04e59d..3d429b80eac02769064d67bc5e5e8d36cf519f01 100644 (file)
@@ -68,7 +68,7 @@ test-$(1)::
 
 reset-$(1)::
        @if test -d $($(2)_PATH); then \
-               if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
+               if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE/NEEDED_$(2)_BRANCH) >/dev/null 2>&1) ; then \
                        echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
                fi;  \
        else \