Skip to content

Commit bfad1e0

Browse files
authored
Merge pull request #648 from thockin/release-3.x
V3 e2e: fix git submodules for file://
2 parents 482bf07 + e712435 commit bfad1e0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

test_e2e.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function e2e::sync_tag() {
520520
# First sync
521521
echo "$FUNCNAME 1" > "$REPO"/file
522522
git -C "$REPO" commit -qam "$FUNCNAME 1"
523-
git -C "$REPO" tag -f "$TAG" >/dev/null
523+
git -C "$REPO" tag -f "$TAG" -m "$TAG" >/dev/null
524524

525525
GIT_SYNC \
526526
--wait=0.1 \
@@ -538,15 +538,15 @@ function e2e::sync_tag() {
538538
# Add something and move the tag forward
539539
echo "$FUNCNAME 2" > "$REPO"/file
540540
git -C "$REPO" commit -qam "$FUNCNAME 2"
541-
git -C "$REPO" tag -f "$TAG" >/dev/null
541+
git -C "$REPO" tag -f "$TAG" -m "$TAG" >/dev/null
542542
sleep 3
543543
assert_link_exists "$ROOT"/link
544544
assert_file_exists "$ROOT"/link/file
545545
assert_file_eq "$ROOT"/link/file "$FUNCNAME 2"
546546

547547
# Move the tag backward
548548
git -C "$REPO" reset -q --hard HEAD^
549-
git -C "$REPO" tag -f "$TAG" >/dev/null
549+
git -C "$REPO" tag -f "$TAG" -m "$TAG" >/dev/null
550550
sleep 3
551551
assert_link_exists "$ROOT"/link
552552
assert_file_exists "$ROOT"/link/file
@@ -1560,7 +1560,7 @@ function e2e::submodule_sync_default() {
15601560
git -C "$NESTED_SUBMODULE" commit -aqm "init nested-submodule file"
15611561

15621562
# Add submodule
1563-
git -C "$REPO" submodule add -q file://$SUBMODULE
1563+
git -C "$REPO" -c protocol.file.allow=always submodule add -q file://$SUBMODULE
15641564
git -C "$REPO" commit -aqm "add submodule"
15651565

15661566
GIT_SYNC \
@@ -1579,7 +1579,7 @@ function e2e::submodule_sync_default() {
15791579
# Make change in submodule repo
15801580
echo "$FUNCNAME 2" > "$SUBMODULE"/submodule
15811581
git -C "$SUBMODULE" commit -qam "$FUNCNAME 2"
1582-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1582+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
15831583
git -C "$REPO" commit -qam "$FUNCNAME 2"
15841584
sleep 3
15851585
assert_link_exists "$ROOT"/link
@@ -1589,7 +1589,7 @@ function e2e::submodule_sync_default() {
15891589

15901590
# Move backward in submodule repo
15911591
git -C "$SUBMODULE" reset -q --hard HEAD^
1592-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1592+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
15931593
git -C "$REPO" commit -qam "$FUNCNAME 3"
15941594
sleep 3
15951595
assert_link_exists "$ROOT"/link
@@ -1598,9 +1598,9 @@ function e2e::submodule_sync_default() {
15981598
assert_file_eq "$ROOT"/link/$SUBMODULE_REPO_NAME/submodule "submodule"
15991599

16001600
# Add nested submodule to submodule repo
1601-
git -C "$SUBMODULE" submodule add -q file://$NESTED_SUBMODULE
1601+
git -C "$SUBMODULE" -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE
16021602
git -C "$SUBMODULE" commit -aqm "add nested submodule"
1603-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1603+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
16041604
git -C "$REPO" commit -qam "$FUNCNAME 4"
16051605
sleep 3
16061606
assert_link_exists "$ROOT"/link
@@ -1614,7 +1614,7 @@ function e2e::submodule_sync_default() {
16141614
rm -rf "$SUBMODULE"/.git/modules/$NESTED_SUBMODULE_REPO_NAME
16151615
git -C "$SUBMODULE" rm -qf $NESTED_SUBMODULE_REPO_NAME
16161616
git -C "$SUBMODULE" commit -aqm "delete nested submodule"
1617-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1617+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
16181618
git -C "$REPO" commit -qam "$FUNCNAME 5"
16191619
sleep 3
16201620
assert_link_exists "$ROOT"/link
@@ -1651,7 +1651,7 @@ function e2e::submodule_sync_depth() {
16511651
echo "$FUNCNAME 1" > "$SUBMODULE"/submodule
16521652
git -C "$SUBMODULE" add submodule
16531653
git -C "$SUBMODULE" commit -aqm "submodule $FUNCNAME 1"
1654-
git -C "$REPO" submodule add -q file://$SUBMODULE
1654+
git -C "$REPO" -c protocol.file.allow=always submodule add -q file://$SUBMODULE
16551655
git -C "$REPO" config -f "$REPO"/.gitmodules submodule.$SUBMODULE_REPO_NAME.shallow true
16561656
git -C "$REPO" commit -qam "$FUNCNAME 1"
16571657

@@ -1679,7 +1679,7 @@ function e2e::submodule_sync_depth() {
16791679
# Move forward
16801680
echo "$FUNCNAME 2" > "$SUBMODULE"/submodule
16811681
git -C "$SUBMODULE" commit -aqm "submodule $FUNCNAME 2"
1682-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1682+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
16831683
git -C "$REPO" commit -qam "$FUNCNAME 2"
16841684
sleep 3
16851685
assert_link_exists "$ROOT"/link
@@ -1696,7 +1696,7 @@ function e2e::submodule_sync_depth() {
16961696

16971697
# Move backward
16981698
git -C "$SUBMODULE" reset -q --hard HEAD^
1699-
git -C "$REPO" submodule update --recursive --remote > /dev/null 2>&1
1699+
git -C "$REPO" -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
17001700
git -C "$REPO" commit -qam "$FUNCNAME 3"
17011701
sleep 3
17021702
assert_link_exists "$ROOT"/link
@@ -1728,7 +1728,7 @@ function e2e::submodule_sync_off() {
17281728
git -C "$SUBMODULE" commit -aqm "init submodule file"
17291729

17301730
# Add submodule
1731-
git -C "$REPO" submodule add -q file://$SUBMODULE
1731+
git -C "$REPO" -c protocol.file.allow=always submodule add -q file://$SUBMODULE
17321732
git -C "$REPO" commit -aqm "add submodule"
17331733

17341734
GIT_SYNC \
@@ -1767,11 +1767,11 @@ function e2e::submodule_sync_shallow() {
17671767
echo "nested-submodule" > "$NESTED_SUBMODULE"/nested-submodule
17681768
git -C "$NESTED_SUBMODULE" add nested-submodule
17691769
git -C "$NESTED_SUBMODULE" commit -aqm "init nested-submodule file"
1770-
git -C "$SUBMODULE" submodule add -q file://$NESTED_SUBMODULE
1770+
git -C "$SUBMODULE" -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE
17711771
git -C "$SUBMODULE" commit -aqm "add nested submodule"
17721772

17731773
# Add submodule
1774-
git -C "$REPO" submodule add -q file://$SUBMODULE
1774+
git -C "$REPO" -c protocol.file.allow=always submodule add -q file://$SUBMODULE
17751775
git -C "$REPO" commit -aqm "add submodule"
17761776

17771777
GIT_SYNC \

0 commit comments

Comments
 (0)