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:43 UTC
Message-ID
<AANLkTikw0Cx7aymTxpjRwwxdj0s607eL0creyV5Y+KJQ@mail.gmail.com>
In-Reply-To
<15224422.248536.1284387218322.JavaMail.root@mail.hq.genarts.com>
On Mon, Sep 13, 2010 at 4:13 PM, Stephen Bash <bash@genarts.com> wrote:
Show 18 quoted lines
> ----- Original Message -----
>> From: "Santi Béjar" <santi@agolina.net>
>> To: "Stephen Bash" <bash@genarts.com>
>> Cc: "Michele Ballabio" <barra_cuda@katamail.com>, "Git Mailing List" <git@vger.kernel.org>
>> Sent: Monday, September 13, 2010 10:00:18 AM
>> Subject: Re: git log for a merged branch
>>
>> 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^@)
>
> That's surprisingly compact...  Impressive.
>
> Slightly changing the topic, we normally tag the release branch, then merge, then delete the branch.  Is there a simple way to determine mergemt from the release tag?

So, in other words, you want the list of descendants of the given release tag say v1.7.3-rc1, contained in a give branch, say "master":

$ git rev-list --parents v1.7.3-rc1..master | grep $(git rev-parse v1.7.3-rc1^{}) 5418d96ddca8134b5abeb99430f61c062d91f722 3b3a8ed4beadf5d9437597108355b23c7143bc81

But note that it may not be unique and may change over time. In particular if you have more commits on top of the tag and merge again.

Santi
Previous: Stephen Bash
Message 8 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.