summaryrefslogtreecommitdiff
path: root/t/t5607-clone-bundle.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-15 13:50:16 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-15 13:50:16 -0700
commita8c207797f2fe624c4959487e3508dde96f68976 (patch)
tree6933bb5b61b08cc9adf218024a19a4651f6fd525 /t/t5607-clone-bundle.sh
parentd690c44846b3e6450a98e09f43f4b40ec73f9762 (diff)
parentec0f362e869fc74c3c9f011ae2097daa1c938833 (diff)
Merge branch 'jt/clone-guess-remote-head-fix'
"git clone" still gave the message about the default branch name; this message has been turned into an advice message that can be turned off. * jt/clone-guess-remote-head-fix: advice: allow disabling default branch name advice builtin/clone: suppress unexpected default branch advice remote: allow `guess_remote_head()` to suppress advice
Diffstat (limited to 't/t5607-clone-bundle.sh')
-rwxr-xr-xt/t5607-clone-bundle.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh
index 82e3621ec5..d709bea753 100755
--- a/t/t5607-clone-bundle.sh
+++ b/t/t5607-clone-bundle.sh
@@ -211,4 +211,16 @@ test_expect_success 'git bundle v3 rejects unknown capabilities' '
test_grep "unknown capability .unknown=silly." output
'
+test_expect_success 'cloning bundle suppresses default branch name advice' '
+ test_when_finished "rm -rf bundle-repo clone-repo" &&
+
+ git init bundle-repo &&
+ git -C bundle-repo commit --allow-empty -m init &&
+ git -C bundle-repo bundle create repo.bundle --all &&
+ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
+ git clone --single-branch bundle-repo/repo.bundle clone-repo 2>err &&
+
+ test_grep ! "hint: " err
+'
+
test_done