Re: [PATCH v2 1/2] rebase: use test_commit helper in setup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2022, 07:50 UTC
- Message-ID
- <xmqqee36watb.fsf@gitster.g>
- In-Reply-To
- <f3f084adfa616a7bae7e7c94644f65a36f38652b.1647019492.git.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: John Cai <johncai86@gmail.com> > > To prepare for the next commit that will test rebase with oids instead > of branch names, update the rebase setup test to add a couple of tags we > can use. This uses the test_commit helper so we can replace some lines > that add a commit manually.
OK.
> test_expect_success 'prepare repository with topic branches' ' > - git config core.logAllRefUpdates true &&
This lossage is not explained. I do not know if we actually make use of the reflog in the tests, though.
Show 18 quoted lines
> - echo First >A && > - git update-index --add A && > - git commit -m "Add A." && > + test_commit "Add A." A First First && > git checkout -b force-3way && > echo Dummy >Y && > git update-index --add Y && > @@ -32,9 +29,7 @@ test_expect_success 'prepare repository with topic branches' ' > git mv A D/A && > git commit -m "Move A." && > git checkout -b my-topic-branch main && > - echo Second >B && > - git update-index --add B && > - git commit -m "Add B." && > + test_commit "Add B." B Second Second && > git checkout -f main && > echo Third >>A && > git update-index A &&