Subject: Re: [PATCH] t4013: add expected failure for "log --patch --no-patch"

From: Felipe Contreras <[email-masked]>
Date: Mon, 08 May 2023 19:07:14 -0600

Junio C Hamano wrote:
> Junio C Hamano <[email-masked]> writes:
> > Sergey Organov <[email-masked]> writes:
> >
> >> --patch followed by --no-patch is to be a no-op according to the "git
> >> log" manual page.
> >
> > I briefly wondered if it is a bug in the documentation.
> > ... when "git log -p --raw" shows both patch and raw, I do not
> > think of a reason why "git log -p --raw --no-patch" should not
> > behave similarly.
> 
> So, to tie the loose ends, "log -p --raw --no-patch" and "log -p
> --stat --no-patch" do behave similarly.  Where my reaction was
> mistaken was that I did not read the manual page myself that clearly
> said it is the same as "-s" that suppresses diff output (where "diff
> output" is not limited to "patch"---diffstat is also output of "diff"),
> and incorrectly thought that "--no-patch" would countermand only
> "--patch" and nothing else.

If Sergey, you, and me all agreed on what `--no-patch` should do
(without reading the manpage), isn't that an indication that that is the
expected behavior?

The fact that the documentation documents some unexpected behavior,
doesn't mean it isn't a bug.

I would say it's a documented bug.

-- 
Felipe Contreras