Subject: Re: [BUG] In git-log, --name-status flag overrides the --patch flag

From: Đoàn Trần Công Danh <[email-masked]>
Date: Thu, 24 Dec 2020 06:54:59 +0700

On 2020-12-21 11:09:58-0800, Junio C Hamano <[email-masked]> wrote:
> Đoàn Trần Công Danh  <[email-masked]> writes:
> 
> > On 2020-12-20 01:23:05-0300, Érico Rolim <[email-masked]> wrote:
> >> Hi!
> >> 
> >> When using the command
> >> 
> >>   git log --patch --name-status
> >> 
> >> It seems the name-status flag somehow overrides the patch flag, by which I mean
> >> that I get the same output as simply running
> >> 
> >>   git log --name-status
> >> 
> >> It would be nice for the combination of these two flags to work, as it would
> >> allow one to view both a summary of changed files as well as the changes
> >> themselves, at the same time.
> >
> > I'm not arguing if this your expectation is make sense or not,
> > however, the Documentation says something about "Show only"...
> 
> Perhaps the documentation would need to be clarified?

Honestly, I think documentation is fine, "Show only"... should mean
only.

>
> I suspect
> this is not very useful combination [*1*] and if this were years
> ago, I would suggest making the command line error out, instead of
> silently ignore one and keep the other one in effect.

Although, I don't have strong opinion on this combination,
I would say yes, and we should error out for other combination like
--name-status --patch too. And Érico, in a reply to me, said he would
prefer seeing an error instead of silencely discard one option.
I'll look into the implementation in this weekend.

> 
> 
> [Footnote]
> 
> *1* "--patch --stat --summmary" was designed as the standard "both a
>     summary as well as the changes".

-- 
Danh