Re: [PATCH v3] t7064: avoid relying on a specific default branch name
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 9, 2020, 10:01 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2012091059480.25979@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqq360f6hlt.fsf_-_@gitster.c.googlers.com>
Hi Junio,
On Tue, 8 Dec 2020, Junio C Hamano wrote:
Show 22 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > 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> > --- > > * v2 used to depend on an older round of a topic that is not in > 'next' (sj/untracked-files-in-submoduledirectory-is-not-dirty). > As the topic stopped touching this test, I rebased the patch on > top of 3a0b884c (Tenth batch, 2020-12-02)
Thank you. By doing that, I figure you increased the chances of this patch making it through the integration branches quicker. BTW just for curious lurkers, here is the range-diff:
1: 1d5591c69a5 ! 1: e8003bfeee7 t7064: avoid relying on a specific default branch name
@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'untracked changes in added submodu
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S..U 000000 160000 160000 $ZERO_OID $HSUB sub1
-@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'untracked changes in added submodule (A. S...) (untracked i
-
- cat >expect <<-EOF &&
- # branch.oid $HSUP
-- # branch.head master
-- # branch.upstream origin/master
-+ # branch.head initial-branch
-+ # branch.upstream origin/initial-branch
- # branch.ab +0 -0
- 1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
- 1 A. S... 000000 160000 160000 $ZERO_OID $HSUB sub1
@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'staged changes in added submodule (AM S.M.)' ' cat >expect <<-EOF &&
@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'staged and untracked changes in ad
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.MU 000000 160000 160000 $ZERO_OID $HSUB sub1
-@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'staged and untracked changes in added submodule (AM S.M.) (
-
- cat >expect <<-EOF &&
- # branch.oid $HSUP
-- # branch.head master
-- # branch.upstream origin/master
-+ # branch.head initial-branch
-+ # branch.upstream origin/initial-branch
- # branch.ab +0 -0
- 1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
- 1 AM S.M. 000000 160000 160000 $ZERO_OID $HSUB sub1
@@ t/t7064-wtstatus-pv2.sh: test_expect_success 'commit within the submodule appears as new commit in supercat >expect <<-EOF &&
Thanks, Dscho