summaryrefslogtreecommitdiff
path: root/t/lib-submodule-update.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-06-14 13:33:29 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-06-14 13:33:29 +0900
commit2019256717d70bcfa1c6cd3869cfdc02310adb7a (patch)
treea354a9651be896d3b088356b0a73fb280fb14df8 /t/lib-submodule-update.sh
parentMerge branch 'dd/honor-users-tar-in-tests' (diff)
parenttest-lib: split up and deprecate test_create_repo() (diff)
downloadtgif-2019256717d70bcfa1c6cd3869cfdc02310adb7a.tar.xz
Merge branch 'ab/test-lib-updates'
Test clean-up. * ab/test-lib-updates: test-lib: split up and deprecate test_create_repo() test-lib: do not show advice about init.defaultBranch under --verbose test-lib: reformat argument list in test_create_repo() submodule tests: use symbolic-ref --short to discover branch name test-lib functions: add --printf option to test_commit describe tests: convert setup to use test_commit test-lib functions: add an --annotated option to "test_commit" test-lib-functions: document test_commit --no-tag test-lib-functions: reword "test_commit --append" docs test-lib tests: remove dead GIT_TEST_FRAMEWORK_SELFTEST variable test-lib: bring $remove_trash out of retirement
Diffstat (limited to 't/lib-submodule-update.sh')
-rw-r--r--t/lib-submodule-update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 4b714e9308..f7c7df0ca4 100644
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -63,6 +63,7 @@ create_lib_submodule_repo () {
git init submodule_update_repo &&
(
cd submodule_update_repo &&
+ branch=$(git symbolic-ref --short HEAD) &&
echo "expect" >>.gitignore &&
echo "actual" >>.gitignore &&
echo "x" >file1 &&
@@ -144,7 +145,7 @@ create_lib_submodule_repo () {
git checkout -b valid_sub1 &&
git revert HEAD &&
- git checkout "${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}"
+ git checkout "$branch"
)
}