diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-06-03 13:15:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-06 21:00:21 +0200 |
commit | 1d758728fb26f574169b7f0b420e59af1d0c3c84 (patch) | |
tree | 6ae00b155e4436ad23649b19124a7da305ce643d /t/t3426-rebase-submodule.sh | |
parent | tests: don't assume a .git/info for .git/info/refs (diff) | |
download | git-1d758728fb26f574169b7f0b420e59af1d0c3c84.tar.xz git-1d758728fb26f574169b7f0b420e59af1d0c3c84.zip |
tests: don't assume a .git/info for .git/info/exclude
Change those tests that assumed that a .git/info directory would be
created for them when writing .git/info/exclude to explicitly create
the directory by setting "TEST_CREATE_REPO_NO_TEMPLATE=1" before
sourcing test-lib.sh, and using the "--template=" argument to "git
clone" and "git init".
In the case of ".git/modules/sub1/info" we deviate from the
established pattern in this and preceding commits of passing a
"--template=" and doing a "mkdir .git/info".
In that case "git checkout" will run the "submodule--helper clone",
and both e.g. "git submodule update --init" and "git checkout" do not
have a way to pass down options to the eventual "git init" or "git
clone". Let's instead assume that the submodule was populated with our
default templates, remove them, and then run the "mkdir".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3426-rebase-submodule.sh')
-rwxr-xr-x | t/t3426-rebase-submodule.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t3426-rebase-submodule.sh b/t/t3426-rebase-submodule.sh index 0ad3a07bf4..7a9f1127a4 100755 --- a/t/t3426-rebase-submodule.sh +++ b/t/t3426-rebase-submodule.sh @@ -35,6 +35,7 @@ git_rebase_interactive () { ls -1pR * >>actual && test_cmp expect actual && set_fake_editor && + mkdir .git/info && echo "fake-editor.sh" >.git/info/exclude && may_only_be_test_must_fail "$2" && $2 git rebase -i "$1" |