#!/bin/sh
GVF=GIT-VERSION-FILE
- DEF_VER=v2.31.4
-DEF_VER=v2.30.6
++DEF_VER=v2.31.5
LF='
'
'
test_expect_success 'autostash with dirty submodules' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
git checkout -b with-submodule &&
- git submodule add ./ sub &&
+ git -c protocol.file.allow=always submodule add ./ sub &&
test_tick &&
git commit -m add-submodule &&
echo changed >sub/file0 &&
pwd=$(pwd)
test_expect_success 'setup' '
- git checkout -b master &&
+ git config --global protocol.file.allow always &&
+ git checkout -b main &&
test_commit commit1 &&
mkdir sub &&
(
'
test_expect_success 'moving nested submodules' '
+ test_config_global protocol.file.allow always &&
git commit -am "cleanup commit" &&
mkdir sub_nested_nested &&
- (cd sub_nested_nested &&
- touch nested_level2 &&
+ (
+ cd sub_nested_nested &&
+ >nested_level2 &&
git init &&
git add . &&
git commit -m "nested level 2"
subcommands of git submodule.
'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
+ test_expect_success 'setup - enable local submodules' '
+ git config --global protocol.file.allow always
+ '
+
test_expect_success 'submodule deinit works on empty repository' '
git submodule deinit --all
'
'
TEST_NO_CREATE_REPO=1
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
+ test_expect_success 'setup' '
+ git config --global protocol.file.allow always
+ '
+
test_expect_success 'submodule on detached working tree' '
git init --bare remote &&
test_create_repo bundle1 &&
#!/bin/sh
test_description='check handling of .gitmodule path with dash'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
+ test_expect_success 'setup' '
+ git config --global protocol.file.allow always
+ '
+
test_expect_success 'create submodule with dash in path' '
git init upstream &&
git -C upstream commit --allow-empty -m base &&
test_expect_success 'setup submodule' '
- git checkout -f master &&
+ test_config_global protocol.file.allow always &&
+ git checkout -f main &&
mkdir sub &&
(
cd sub &&
test_expect_success 'submodule fast-export | fast-import' '
- SUBENT1=$(git ls-tree master^ sub) &&
- SUBENT2=$(git ls-tree master sub) &&
+ test_config_global protocol.file.allow always &&
+ SUBENT1=$(git ls-tree main^ sub) &&
+ SUBENT2=$(git ls-tree main sub) &&
rm -rf new &&
mkdir new &&
git --git-dir=new/.git init &&