Skip to content

Commit 8a1156d

Browse files
committed
merge doesn't work when init
sadly the merge strategy doesn't work when doing an initial clone, circumvent that
1 parent e2dd891 commit 8a1156d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,16 @@ distclean: clean
9898
@@rm -rf test/qunit src/sizzle
9999

100100
# change pointers for submodules and update them to what is specified in jQuery
101+
# --merge doesn't work when doing an initial clone, thus test if we have non-existing
102+
# submodules, then do an real update
101103
update_submodules:
102-
@@if [ -d .git ]; then git submodule update --init --recursive --merge; fi
104+
@@if [ -d .git ]; then \
105+
if git submodule status | grep -q -E '^-'; then \
106+
git submodule update --init --recursive; \
107+
else \
108+
git submodule update --init --recursive --merge; \
109+
fi; \
110+
fi;
103111

104112
# update the submodules to the latest at the most logical branch
105113
pull_submodules:

0 commit comments

Comments
 (0)