t7064: avoid relying on a specific default branch name
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 7 Dec 2020 15:19:40 +0000 (15:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Dec 2020 22:44:02 +0000 (14:44 -0800)
commit469f17d09789e781bee22edf6233f234a2c5afd3
tree63441a47780c2a008261519c0b684d3731a135c6
parent3a0b884caba2752da0af626fb2de7d597c844e8b
t7064: avoid relying on a specific default branch name

To allow us to consider a change in the default behavior of `git init`
where it uses a more inclusive name for the initial branch, we must
first teach the test suite not to rely on a specific default branch
name. In this patch, we teach t7064 that trick.

To that end, we set a specific name for the initial branch. Ideally, we
would simply start out by calling `git branch -M initial-branch`, but
there is a bug in `git branch -M` that does not allow renaming branches
unless they already have commits. This will be fixed in the
`js/init-defaultbranch-advice` topic, and until that time, we use the
equivalent (but less intuitive) `git checkout -f --orphan`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7064-wtstatus-pv2.sh