Re: [PATCH v4] diff: stop output garbled message in dry run mode
- From
Lidong Yan <yldhome2d2@gmail.com>
- Date
- Oct 23, 2025, 00:27 UTC
- Message-ID
- <4CB69AD9-2A1B-46FE-88DA-B98CF81C528A@gmail.com>
- In-Reply-To
- <xmqqwm4mwrix.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 24 quoted lines
>
> t/t4013-diff-various.sh | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
> index d35695f5b0..c0a558da55 100755
> --- a/t/t4013-diff-various.sh
> +++ b/t/t4013-diff-various.sh
> @@ -683,11 +683,7 @@ test_expect_success 'diff -I<regex>: ignore all content changes' '
>
> test_diff_no_content_changes () {
> git diff $1 --ignore-blank-lines -I".*" >actual &&
> - test_line_count = 3 actual &&
> - test_grep "file1" actual &&
> - test_grep "file2" actual &&
> - test_grep "file3" actual &&
> - test_grep ! "diff --git" actual
> + test_must_be_empty actual
> } &&
> test_diff_no_content_changes "--raw" &&
> test_diff_no_content_changes "--name-only" &&
> --
> 2.51.1-638-ge1c807bd82
> file1 is removed, file2 changes its mode from a regular file to a directory and file3 is unmerged -- but the output is empty? I am just a little confused why the ‘actual’ file should be empty.
Thanks, Lidong