Subject: Re: [PATCH] t0008: fix "large exclude file ignored in tree"

From: Junio C Hamano <[email-masked]>
Date: Sat, 14 Mar 2026 22:50:42 -0700

Mirko Faina <[email-masked]> writes:

> 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?

> 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?

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.

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

> 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 &&