Re: [PATCH 2/8] t5333: demonstrate various pseudo-merge bugs
- From
Elijah Newren <newren@gmail.com>
- Date
- Apr 19, 2026, 00:25 UTC
- Message-ID
- <CABPp-BFFWpeHUemuDiJjXEhqyJ=amSOsEdrLFtYBrMWg3LpAmg@mail.gmail.com>
- In-Reply-To
- <f4899b668e229069a10d7fc627835dbdc12d7b39.1776124588.git.me@ttaylorr.com>
On Mon, Apr 13, 2026 at 4:56 PM Taylor Blau <me@ttaylorr.com> wrote:
Show 30 quoted lines
> > Using the test helper introduced via the previous commit, add various > failing tests demonstrating bugs in the pseudo-merge implementation. > > These are all marked as failing with one exception. The "sampleRate=0" > test describes a latent bug, which is only reachable through a code path > that is itself masked by a separate bug. A future commit will fix that > bug, and, in turn, cause the aforementioned test to fail. Accordingly, > that commit will mark the test as failing, and it will be re-marked as > passing in a separate commit which fixes the once-latent bug. > > For the rest: the following commits will explain and fix the underlying > bugs in detail. > > Signed-off-by: Taylor Blau <me@ttaylorr.com> > --- > t/t5333-pseudo-merge-bitmaps.sh | 198 ++++++++++++++++++++++++++++++++ > 1 file changed, 198 insertions(+) > > diff --git a/t/t5333-pseudo-merge-bitmaps.sh b/t/t5333-pseudo-merge-bitmaps.sh > index 1f7a5d82ee4..20e77ab4390 100755 > --- a/t/t5333-pseudo-merge-bitmaps.sh > +++ b/t/t5333-pseudo-merge-bitmaps.sh > @@ -462,4 +462,202 @@ test_expect_success 'use pseudo-merge in boundary traversal' ' > ) > ' > > +test_expect_failure 'apply pseudo-merges during fill-in traversal' ' > + git init pseudo-merge-fill-in-traversal && > + test_when_finished "rm -fr pseudo-merge-fill-in-traversal" &&
As suggested in the first patch, test_when_finished before the git init. (Same issue occurs later in this file as well.)
[...]
> + : >trace2.txt &&
The `: >trace2.txt` struck me as odd, since this file doesn't even exist yet in this test...but thinking more, is this just defensive in case someone adds inserts or modifies a previous test which writes to trace2.txt? I like that idea; somehow hadn't seen it before.
> + GIT_TRACE2_EVENT=$PWD/trace2.txt \ > + git rev-list --count --objects --use-bitmap-index HEAD >actual &&
I thought this was broken without quoting $PWD, but looks like I forgot shell quoting rules again. Assignments don't undergo word splitting, globbing, or brace expansion. So, nothing to see here either.
Show 5 quoted lines
> + test_pseudo_merges_satisfied 1 <trace2.txt && > + > + test_cmp expect actual > + ) > +'
Didn't spot anything different to comment on for the rest of the patch, so the only substantive comment I had was on the test_when_finished and init ordering.