Re: [PATCH v2 1/3] sequencer: comment checked-out branch properly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 13, 2024, 01:18 UTC
- Message-ID
- <xmqq7c982aoi.fsf@gitster.g>
- In-Reply-To
- <xmqqikss2b7l.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 35 quoted lines
> kristofferhaugsbakk@fastmail.com writes: > >> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh >> index 09f230eefb2..f61a717b190 100755 >> --- a/t/t3400-rebase.sh >> +++ b/t/t3400-rebase.sh >> @@ -456,4 +456,20 @@ test_expect_success 'rebase when inside worktree subdirectory' ' >> ) >> ' >> >> +test_expect_success 'git rebase --update-ref with core.commentChar and branch on worktree' ' >> + test_when_finished git branch -D base topic2 && >> + test_when_finished git checkout main && >> + test_when_finished git branch -D wt-topic && >> + test_when_finished git worktree remove wt-topic && >> + git checkout main && >> + git checkout -b base && >> + git checkout -b topic2 && >> + test_commit msg2 && >> + git worktree add wt-topic && >> + git checkout base && >> + test_commit msg3 && >> + git checkout topic2 && >> + git -c core.commentChar=% rebase --update-refs base >> +' > > Can we improve this test a bit to give it more visibility into the > breakage? > > I am sure that the internal machinery gets confused because it wants > to skip commented out lines assuming '%' is used for comments, and > fails to skip lines that are commented with '#', but it is a bit too > opaque how this would break without the fix. Perhaps add a line or > two of a comment to the test to describe what the expected mode of > failure is?
Something like "a line commented-out with '#' in the list of instructions used internally by "rebase" is not recognised as a comment and you'd get an error that says '#' is not a valid instruction", perhaps.