public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Mirko Faina <mroik@delayed.space>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Mirko Faina <mroik@delayed.space>
Subject: Re: [PATCH] t0008: fix "large exclude file ignored in tree"
Date: Sun, 15 Mar 2026 09:50:06 +0100	[thread overview]
Message-ID: <abZwbCF1R0_bnFBv@exploit> (raw)
In-Reply-To: <xmqqv7extzd9.fsf@gitster.g>

On Sat, Mar 14, 2026 at 10:50:42PM -0700, Junio C Hamano wrote:
> > Subject: Re: [PATCH] t0008: fix "large exclude file ignored in tree"
> 
> Strange.  That is clearly not what this patch is touching.
> 
>   Subject: t0008: fix cleanup in 'symlinks not respected in-tree'
> 
> or something?

The test I'm touching is "symlinks not respected in-tree", but the test
failing is "large exclude file ignored in tree". That's why in the
following section it mentions "the previous test".

> > Add cleanup to previous test for file that is unrequired to test the
> > size of the ignored exclude file.
> 
> This description is also inaccurate. It seems to be talking about the
> next test in the file ("large exclude file ignored in tree") rather than
> the one it's actually changing. Worse, the next test does its own
> creation of the "large" .gitignore file and also cleans it up itself,
> so there seem to be no need to fix it, either.
> 
>     The test 'symlinks not respected in-tree' creates a 'subdir'
>     directory and 'subdir/.gitignore' symlink, but only removes the
>     top-level '.gitignore' file in its cleanup.
> 
>     Add 'subdir' to the test_when_finished command to ensure the
>     worktree is properly cleaned up after the test.
> 
> or something, perhaps?

When running "GIT_TEST_OPTS='-l -v' git make t0008-ignores.sh", "large
exclude file ignored in tree" fails with the comparison failing due to
an extra warning "warning: unable to access 'subdir/.gitignore': Too
many levels of symbolic links".

I don't know if this tests fails only on my setup, but seeing that the
failing test is supposed to check for .gitignore size only, the "subdir"
directory is not strictly necessary, without it the test works just
fine.

> This patch has some disturbing characteristics.
> 
> - The subject line and commit message describe a fix for the "large
>   exclude file ignored in tree" test, but the code change actually
>   modifies the "symlinks not respected in-tree" test.
> - The description mentions a file "unrequired to test the size", which
>   doesn't logically apply to the change being made (adding a directory
>   to a cleanup command in a symlink test).
> - This kind of context-mixing (applying a correct fix for one test but
>   attributing it to a neighboring one) is a common pattern in LLM
>   outputs.

Sorry for very bad commit message. When writing it and knowing where the
problem is, I found it obvious. Now reading it again, it doesn't make
sense at all without additional context.

> Is this generated with LLM sent without any sanity-checking by a
> human?

No, this was all hand written. This mess is all due to my incompetency.

> > diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
> > index db8bde280e..18e048ee8c 100755
> > --- a/t/t0008-ignores.sh
> > +++ b/t/t0008-ignores.sh
> > @@ -946,7 +946,7 @@ test_expect_success SYMLINKS 'symlinks respected in info/exclude' '
> >  '
> >  
> >  test_expect_success SYMLINKS 'symlinks not respected in-tree' '
> > -	test_when_finished "rm .gitignore" &&
> > +	test_when_finished "rm -rf subdir .gitignore" &&
> >  	ln -s ignore .gitignore &&
> >  	mkdir subdir &&
> >  	ln -s ignore subdir/.gitignore &&

  reply	other threads:[~2026-03-15  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15  3:48 [PATCH] t0008: fix "large exclude file ignored in tree" Mirko Faina
2026-03-15  5:50 ` Junio C Hamano
2026-03-15  8:50   ` Mirko Faina [this message]
2026-03-15 16:04     ` Junio C Hamano
2026-03-16  1:15 ` [PATCH v2] t0008: improve test cleanup to fix failing test Mirko Faina
2026-03-16  1:21   ` Mirko Faina
2026-03-16 19:48   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abZwbCF1R0_bnFBv@exploit \
    --to=mroik@delayed.space \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox