Subject: Re: so/diff-merges-more (was Re: What's cooking in git.git (Feb 2023, #01; Thu, 2))

From: Sergey Organov <[email-masked]>
Date: Wed, 29 Mar 2023 11:06:21 +0300

Sergey Organov <[email-masked]> writes:

[...]

> [As a side-note, current behavior of implied -p, explicit -p, -s, and
> --raw with respect to each other that I figured by experiment looks
> suspect to me. E.g., once explicit -p is given, and then canceled by -s,
> I can't get bare --raw output anymore]

Specifically, this test unexpectedly fails:

modified   t/t4013-diff-various.sh
@@ -457,6 +457,16 @@ diff-tree --stat --compact-summary initial mode
 diff-tree -R --stat --compact-summary initial mode
 EOF
 
+# This should succeed, but --patch --no-patch does something hidden
+# that breaks --raw.
+test_expect_success '--no-patch only cancels --patch' '
+	git log --raw master >result &&
+	process_diffs result >expected &&
+	git log --patch --no-patch --raw >result &&
+	process_diffs result >actual &&
+	test_cmp expected actual
+'
+
 test_expect_success 'log -m matches pure log' '
 	git log master >result &&
 	process_diffs result >expected &&

Thanks,
-- Sergey Organov