kristofferhaugsbakk@xxxxxxxxxxxx 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?