git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Should "log --cc" imply "log --cc -p"?

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 5, 2013, 08:58 UTC
Message-ID
<5110C9B3.10102@drmicha.warpmail.net>
In-Reply-To
<7vfw1c3ujo.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 04.02.2013 17:36:
Show 23 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> But diffs are on here ("-p"), it's just that the default diff option for
>> merges is to not display them. Well, I admit there's two different ways
>> of thinking here:
>>
>> A) "git log -p" turns on diffs for all commits, and the default diff
>> options is the (non-existing) "--no-show" diff-option for merges.
>>
>> B) "git log -p" applies "-p" to all commits except merge commits.
>>
>> I'm strongly in the A camp,...
> 
> I can personally be trained to think either way, but I suspect that
> we already came halfway to
> 
>   C) "-p" asks for two-way patches, and "-c/--cc" ask for n-way
>      patches (including but not limited to n==2); it is not that -p
>      asks for patch generation and others modify the finer behaviour
>      of patch generation.
> 
> "git log/diff-files -U8" do not need "-p" to enable textual patches,
> for example.  It is "I already told you that I want 8-line context.
That's a good point that I wasn't aware of.
Show 8 quoted lines
> For what else, other than showing textual diff, do you think I told
> you that for?" and replacing "8-line context" with various other
> options that affect patch generation will give us a variety of end
> user complaints that would tell us that C) is more intuitive to
> them.
> 
> But I do not feel very strongly that I am *right* on this issue, so
> I won't do anything about it hastily right now.

I'm not sure how many of these we have already, but to me it indicates that we should turn diffs on for log with any diff option that only makes sense with a diff. That would make the ui more consistent without taking anything away.

For scripting/aliasing purposes, we have "-s" in order to override any implied "-p" (as I just learned).

Michael
Previous: Junio C HamanoNext: Jeff King
Message 4 of 10 in “[RFC] Should "log --cc" imply "log --cc -p"?”
  1. Junio C HamanoFeb 3, 2013
  2. Michael J GruberFeb 4, 2013
  3. Junio C HamanoFeb 4, 2013
  4. Michael J GruberFeb 5, 2013
  5. Jeff KingFeb 5, 2013
  6. Junio C HamanoFeb 5, 2013
  7. Ævar Arnfjörð BjarmasonFeb 5, 2013
  8. Jeff KingFeb 5, 2013
  9. Ævar Arnfjörð BjarmasonFeb 5, 2013
  10. Junio C HamanoFeb 5, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.