summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"
)
}