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

Re: [Q] Comparing differences introduced by two commits?

From
Jonathan del Strother <maillist@steelskies.com>
Date
Aug 22, 2012, 17:55 UTC
Message-ID
<CAF5DW8J8JL-jGexh+CmmCafFAREjAJrb8zzOwP8b9fEuqUB56w@mail.gmail.com>
In-Reply-To
<7vharuamok.fsf@alter.siamese.dyndns.org>
On 22 August 2012 17:58, Junio C Hamano <gitster@pobox.com> wrote:
Show 35 quoted lines
> Jonathan del Strother <maillist@steelskies.com> writes:
>
>> On 22 August 2012 13:10, Brian Foster <brian.foster@maxim-ic.com> wrote:
>> ...
>>>  In the past I've done:
>>>
>>>     diff <(git show A) <(git show B)
>>>
>>>  which produces rather messy output but is Ok when dealing
>>>  with just one or two sets of A/B commits.  I now have a
>>>  large-ist set of A/B commits, and the above is impractical.
>
> Isn't this what interdiff is for?
>
>>>  Some searching hasn't found any suggestions I'm too happy
>>>  with, albeit I've very possibly overlooked something.
>>
>> What about cherry picking B onto A, then showing the cherry-picked commit?
>>
>> Off the top of my head :
>>
>> git checkout A
>> git cherry-pick B
>> git show HEAD
>
> Wouldn't you see a lot of needless conflicts while doing such a cherry-pick?
>
> I often do
>
>         git checkout A^
>         git cherry-pick B
>         git diff A
>
> when queuing an updated patch.
>
True.  That sounds a better solution.
Previous: Junio C HamanoNext: Brian Foster
Message 4 of 5 in “[Q] Comparing differences introduced by two commits?”
  1. Brian FosterAug 22, 2012
  2. Jonathan del StrotherAug 22, 2012
  3. Junio C HamanoAug 22, 2012
  4. Jonathan del StrotherAug 22, 2012
  5. Brian FosterAug 24, 2012

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.