From: Junio C Hamano Date: Wed, 17 Sep 2025 16:16:23 GMT Subject: Re: [PATCH v3 0/4] breaking changes: switch default initial branch name to "main" Message-ID: In-Reply-To: Junio C Hamano writes: > That does make it more in line in spirit with what your > "breaking-changes: switch default branch to main" does here. > Instead of assuming that we won't have "no default set" hint after > 3.0, we do assume the "no default set" hint will be there and > squelch for a bit longer. I'll do only this one, and revert the other test changes that are now mostly stylistic clean-ups. One thing that may be worth commenting on is this part (which also I reverted as irrelevant to get the 3.0 change going). diff --git a/t/t0001-init.sh b/t/t0001-init.sh index df0040b9ac..c7f39248e0 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -562,9 +562,9 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' ' test_when_finished "rm -rf repo" && test_config_global init.defaultObjectFormat garbage && - echo "warning: unknown hash algorithm ${SQ}garbage${SQ}" >expect && + expect="warning: unknown hash algorithm ${SQ}garbage${SQ}" && git init repo 2>err && - test_cmp expect err && + test_grep "$expect" err && git -C repo rev-parse --show-object-format >actual && echo $GIT_DEFAULT_HASH >expected && I think in the longer run, a change like this that makes us check only what we care about (i.e., "do we warn about unknown hash algo?"), without assuming more than necessary (i.e., "we shouldn't get any other warnings or hints, or this check with test_cmp that expects an exact match will fail), is a good thing. Perhaps a #leftoverbit material. Thanks.