@@ -2403,9 +2403,9 @@ function e2e::submodule_sync_default() {
2403
2403
2404
2404
git -C " $SUBMODULE " init -q -b " $MAIN_BRANCH "
2405
2405
config_repo " $SUBMODULE "
2406
- echo " submodule" > " $SUBMODULE /submodule"
2407
- git -C " $SUBMODULE " add submodule
2408
- git -C " $SUBMODULE " commit -aqm " init submodule file"
2406
+ echo " submodule" > " $SUBMODULE /submodule.file "
2407
+ git -C " $SUBMODULE " add submodule.file
2408
+ git -C " $SUBMODULE " commit -aqm " init submodule. file"
2409
2409
2410
2410
# Init nested submodule repo
2411
2411
NESTED_SUBMODULE_REPO_NAME=" nested-sub"
@@ -2414,12 +2414,12 @@ function e2e::submodule_sync_default() {
2414
2414
2415
2415
git -C " $NESTED_SUBMODULE " init -q -b " $MAIN_BRANCH "
2416
2416
config_repo " $NESTED_SUBMODULE "
2417
- echo " nested-submodule" > " $NESTED_SUBMODULE /nested-submodule"
2418
- git -C " $NESTED_SUBMODULE " add nested-submodule
2419
- git -C " $NESTED_SUBMODULE " commit -aqm " init nested-submodule file"
2417
+ echo " nested-submodule" > " $NESTED_SUBMODULE /nested-submodule.file "
2418
+ git -C " $NESTED_SUBMODULE " add nested-submodule.file
2419
+ git -C " $NESTED_SUBMODULE " commit -aqm " init nested-submodule. file"
2420
2420
2421
2421
# Add submodule
2422
- git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE
2422
+ git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE " $SUBMODULE_REPO_NAME "
2423
2423
git -C " $REPO " commit -aqm " add submodule"
2424
2424
2425
2425
GIT_SYNC \
@@ -2431,20 +2431,20 @@ function e2e::submodule_sync_default() {
2431
2431
wait_for_sync " ${MAXWAIT} "
2432
2432
assert_link_exists " $ROOT /link"
2433
2433
assert_file_exists " $ROOT /link/file"
2434
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2435
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " submodule"
2434
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2435
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " submodule"
2436
2436
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 1
2437
2437
2438
2438
# Make change in submodule repo
2439
- echo " $FUNCNAME 2" > " $SUBMODULE /submodule"
2439
+ echo " $FUNCNAME 2" > " $SUBMODULE /submodule.file "
2440
2440
git -C " $SUBMODULE " commit -qam " $FUNCNAME 2"
2441
2441
git -C " $REPO " -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
2442
2442
git -C " $REPO " commit -qam " $FUNCNAME 2"
2443
2443
wait_for_sync " ${MAXWAIT} "
2444
2444
assert_link_exists " $ROOT /link"
2445
2445
assert_file_exists " $ROOT /link/file"
2446
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2447
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " $FUNCNAME 2"
2446
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2447
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " $FUNCNAME 2"
2448
2448
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 2
2449
2449
2450
2450
# Move backward in submodule repo
@@ -2454,21 +2454,21 @@ function e2e::submodule_sync_default() {
2454
2454
wait_for_sync " ${MAXWAIT} "
2455
2455
assert_link_exists " $ROOT /link"
2456
2456
assert_file_exists " $ROOT /link/file"
2457
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2458
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " submodule"
2457
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2458
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " submodule"
2459
2459
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 3
2460
2460
2461
2461
# Add nested submodule to submodule repo
2462
- git -C " $SUBMODULE " -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE
2462
+ git -C " $SUBMODULE " -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE " $NESTED_SUBMODULE_REPO_NAME "
2463
2463
git -C " $SUBMODULE " commit -aqm " add nested submodule"
2464
2464
git -C " $REPO " -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
2465
2465
git -C " $REPO " commit -qam " $FUNCNAME 4"
2466
2466
wait_for_sync " ${MAXWAIT} "
2467
2467
assert_link_exists " $ROOT /link"
2468
2468
assert_file_exists " $ROOT /link/file"
2469
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2470
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule"
2471
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule" " nested-submodule"
2469
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2470
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule.file "
2471
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule.file " " nested-submodule"
2472
2472
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 4
2473
2473
2474
2474
# Remove nested submodule
@@ -2481,8 +2481,8 @@ function e2e::submodule_sync_default() {
2481
2481
wait_for_sync " ${MAXWAIT} "
2482
2482
assert_link_exists " $ROOT /link"
2483
2483
assert_file_exists " $ROOT /link/file"
2484
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2485
- assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule"
2484
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2485
+ assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule.file "
2486
2486
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 5
2487
2487
2488
2488
# Remove submodule
@@ -2493,7 +2493,7 @@ function e2e::submodule_sync_default() {
2493
2493
wait_for_sync " ${MAXWAIT} "
2494
2494
assert_link_exists " $ROOT /link"
2495
2495
assert_file_exists " $ROOT /link/file"
2496
- assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2496
+ assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2497
2497
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 6
2498
2498
2499
2499
rm -rf $SUBMODULE
@@ -2514,10 +2514,10 @@ function e2e::submodule_sync_depth() {
2514
2514
2515
2515
# First sync
2516
2516
expected_depth=" 1"
2517
- echo " $FUNCNAME 1" > " $SUBMODULE /submodule"
2518
- git -C " $SUBMODULE " add submodule
2517
+ echo " $FUNCNAME 1" > " $SUBMODULE /submodule.file "
2518
+ git -C " $SUBMODULE " add submodule.file
2519
2519
git -C " $SUBMODULE " commit -aqm " submodule $FUNCNAME 1"
2520
- git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE
2520
+ git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE " $SUBMODULE_REPO_NAME "
2521
2521
git -C " $REPO " config -f " $REPO /.gitmodules" " submodule.$SUBMODULE_REPO_NAME .shallow" true
2522
2522
git -C " $REPO " commit -qam " $FUNCNAME 1"
2523
2523
@@ -2530,8 +2530,8 @@ function e2e::submodule_sync_depth() {
2530
2530
&
2531
2531
wait_for_sync " ${MAXWAIT} "
2532
2532
assert_link_exists " $ROOT /link"
2533
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2534
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " $FUNCNAME 1"
2533
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2534
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " $FUNCNAME 1"
2535
2535
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 1
2536
2536
depth=$( git -C " $ROOT /link" rev-list HEAD | wc -l)
2537
2537
if [[ $expected_depth != $depth ]]; then
@@ -2543,14 +2543,14 @@ function e2e::submodule_sync_depth() {
2543
2543
fi
2544
2544
2545
2545
# Move forward
2546
- echo " $FUNCNAME 2" > " $SUBMODULE /submodule"
2546
+ echo " $FUNCNAME 2" > " $SUBMODULE /submodule.file "
2547
2547
git -C " $SUBMODULE " commit -aqm " submodule $FUNCNAME 2"
2548
2548
git -C " $REPO " -c protocol.file.allow=always submodule update --recursive --remote > /dev/null 2>&1
2549
2549
git -C " $REPO " commit -qam " $FUNCNAME 2"
2550
2550
wait_for_sync " ${MAXWAIT} "
2551
2551
assert_link_exists " $ROOT /link"
2552
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2553
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " $FUNCNAME 2"
2552
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2553
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " $FUNCNAME 2"
2554
2554
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 2
2555
2555
depth=$( git -C " $ROOT /link" rev-list HEAD | wc -l)
2556
2556
if [[ $expected_depth != $depth ]]; then
@@ -2567,8 +2567,8 @@ function e2e::submodule_sync_depth() {
2567
2567
git -C " $REPO " commit -qam " $FUNCNAME 3"
2568
2568
wait_for_sync " ${MAXWAIT} "
2569
2569
assert_link_exists " $ROOT /link"
2570
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2571
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " $FUNCNAME 1"
2570
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2571
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " $FUNCNAME 1"
2572
2572
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 3
2573
2573
depth=$( git -C " $ROOT /link" rev-list HEAD | wc -l)
2574
2574
if [[ $expected_depth != $depth ]]; then
@@ -2592,8 +2592,8 @@ function e2e::submodule_sync_off() {
2592
2592
2593
2593
git -C " $SUBMODULE " init -q -b " $MAIN_BRANCH "
2594
2594
config_repo " $SUBMODULE "
2595
- echo " submodule" > " $SUBMODULE /submodule"
2596
- git -C " $SUBMODULE " add submodule
2595
+ echo " submodule" > " $SUBMODULE /submodule.file "
2596
+ git -C " $SUBMODULE " add submodule.file
2597
2597
git -C " $SUBMODULE " commit -aqm " init submodule file"
2598
2598
2599
2599
# Add submodule
@@ -2608,7 +2608,7 @@ function e2e::submodule_sync_off() {
2608
2608
--submodules=off \
2609
2609
&
2610
2610
wait_for_sync " ${MAXWAIT} "
2611
- assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2611
+ assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2612
2612
rm -rf $SUBMODULE
2613
2613
}
2614
2614
@@ -2623,8 +2623,8 @@ function e2e::submodule_sync_shallow() {
2623
2623
2624
2624
git -C " $SUBMODULE " init -q -b " $MAIN_BRANCH "
2625
2625
config_repo " $SUBMODULE "
2626
- echo " submodule" > " $SUBMODULE /submodule"
2627
- git -C " $SUBMODULE " add submodule
2626
+ echo " submodule" > " $SUBMODULE /submodule.file "
2627
+ git -C " $SUBMODULE " add submodule.file
2628
2628
git -C " $SUBMODULE " commit -aqm " init submodule file"
2629
2629
2630
2630
# Init nested submodule repo
@@ -2634,14 +2634,14 @@ function e2e::submodule_sync_shallow() {
2634
2634
2635
2635
git -C " $NESTED_SUBMODULE " init -q -b " $MAIN_BRANCH "
2636
2636
config_repo " $NESTED_SUBMODULE "
2637
- echo " nested-submodule" > " $NESTED_SUBMODULE /nested-submodule"
2638
- git -C " $NESTED_SUBMODULE " add nested-submodule
2637
+ echo " nested-submodule" > " $NESTED_SUBMODULE /nested-submodule.file "
2638
+ git -C " $NESTED_SUBMODULE " add nested-submodule.file
2639
2639
git -C " $NESTED_SUBMODULE " commit -aqm " init nested-submodule file"
2640
- git -C " $SUBMODULE " -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE
2640
+ git -C " $SUBMODULE " -c protocol.file.allow=always submodule add -q file://$NESTED_SUBMODULE " $NESTED_SUBMODULE_REPO_NAME "
2641
2641
git -C " $SUBMODULE " commit -aqm " add nested submodule"
2642
2642
2643
2643
# Add submodule
2644
- git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE
2644
+ git -C " $REPO " -c protocol.file.allow=always submodule add -q file://$SUBMODULE " $SUBMODULE_REPO_NAME "
2645
2645
git -C " $REPO " commit -aqm " add submodule"
2646
2646
2647
2647
GIT_SYNC \
@@ -2654,8 +2654,8 @@ function e2e::submodule_sync_shallow() {
2654
2654
wait_for_sync " ${MAXWAIT} "
2655
2655
assert_link_exists " $ROOT /link"
2656
2656
assert_file_exists " $ROOT /link/file"
2657
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2658
- assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule"
2657
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2658
+ assert_file_absent " $ROOT /link/$SUBMODULE_REPO_NAME /$NESTED_SUBMODULE_REPO_NAME /nested-submodule.file "
2659
2659
rm -rf $SUBMODULE
2660
2660
rm -rf $NESTED_SUBMODULE
2661
2661
}
@@ -2671,14 +2671,14 @@ function e2e::submodule_sync_relative() {
2671
2671
2672
2672
git -C " $SUBMODULE " init -q -b " $MAIN_BRANCH "
2673
2673
config_repo " $SUBMODULE "
2674
- echo " submodule" > " $SUBMODULE /submodule"
2675
- git -C " $SUBMODULE " add submodule
2674
+ echo " submodule" > " $SUBMODULE /submodule.file "
2675
+ git -C " $SUBMODULE " add submodule.file
2676
2676
git -C " $SUBMODULE " commit -aqm " init submodule file"
2677
2677
2678
2678
# Add submodule
2679
2679
REL=" $( realpath --relative-to " $REPO " " $WORK /$SUBMODULE_REPO_NAME " ) "
2680
2680
echo $REL
2681
- git -C " $REPO " -c protocol.file.allow=always submodule add -q " ${ REL} "
2681
+ git -C " $REPO " -c protocol.file.allow=always submodule add -q " $REL " " $SUBMODULE_REPO_NAME "
2682
2682
git -C " $REPO " commit -aqm " add submodule"
2683
2683
2684
2684
GIT_SYNC \
@@ -2690,8 +2690,8 @@ function e2e::submodule_sync_relative() {
2690
2690
wait_for_sync " ${MAXWAIT} "
2691
2691
assert_link_exists " $ROOT /link"
2692
2692
assert_file_exists " $ROOT /link/file"
2693
- assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule"
2694
- assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule" " submodule"
2693
+ assert_file_exists " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file "
2694
+ assert_file_eq " $ROOT /link/$SUBMODULE_REPO_NAME /submodule.file " " submodule"
2695
2695
assert_metric_eq " ${METRIC_GOOD_SYNC_COUNT} " 1
2696
2696
2697
2697
rm -rf $SUBMODULE
0 commit comments