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

Re: git log for a merged branch

From
SBSanti Béjar <santi@agolina.net>
Date
Sep 13, 2010, 14:00 UTC
Message-ID
<AANLkTikbnoR_=x1_Aq4jh1BuMarEMxXkY=iX0iOjdgyt@mail.gmail.com>
In-Reply-To
<30770696.248360.1284385078695.JavaMail.root@mail.hq.genarts.com>
On Mon, Sep 13, 2010 at 3:37 PM, Stephen Bash <bash@genarts.com> wrote:
Show 26 quoted lines
>
>
> ----- Original Message -----
>> From: "Michele Ballabio" <barra_cuda@katamail.com>
>> To: "Stephen Bash" <bash@genarts.com>
>> Cc: "Git Mailing List" <git@vger.kernel.org>
>> Sent: Wednesday, September 8, 2010 7:17:05 PM
>> Subject: Re: git log for a merged branch
>> On Wednesday 08 September 2010, Stephen Bash wrote:
>>
>> Let's call the merge commit "mergecmt". The commit where the "release"
>> branch
>> branched off is
>>
>> git merge-base mergecmt^1 mergecmt^2
>>
>> ... where mergecmt^1 is the first parent of the merge (usually on the
>> "mainline" branch) and mergecmt^2 is the second parent, which
>> usually(*)
>> refers to the "release" branch (in this case, tagFoo).
>>
>> So
>>
>> git log $(git merge-base mergecmt^1 mergecmt^2)..mergecmt^2
>>
>> is what you want.
If there is more than one merge-base you´ll have to use:
git log mergecmt^2 --not $(git merge-base mergecmt^1 mergecmt^2)
and you may use this shorter form:
git log mergecmt^2 --not $(git merge-base mergecmt^@)

HTH, Santi

Previous: Stephen BashNext: Stephen Bash
Message 6 of 8 in “git log for a merged branch”
  1. Stephen BashSep 8, 2010
  2. Tor ArntsenSep 8, 2010
  3. Stephen BashSep 8, 2010
  4. Michele BallabioSep 8, 2010
  5. Stephen BashSep 13, 2010
  6. Santi BéjarSep 13, 2010
  7. Stephen BashSep 13, 2010
  8. Santi BéjarSep 13, 2010

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.