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

Re: How do I show only log messages for commits on a specific branch?

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Dec 16, 2009, 23:26 UTC
Message-ID
<20091216232641.GK25474@genesis.frugalware.org>
In-Reply-To
<51419b2c0912161005n1596d4a1n92ed555c98aee4c6@mail.gmail.com>
On Wed, Dec 16, 2009 at 11:05:52AM -0700, Elijah Newren <newren@gmail.com> wrote:
>   git log new@{30.years.ago}..new
> (You'll get a warning that 'new' hasn't existed for 30 years but it
> doesn't hurt anything)
That's the same as "git log new", if I'm not mistaken.

What Stefan wants to do is to let git log show the commits which are only in the "new" branch, but I don't think there is an out-of-the-box solution for that.

One solution I can think of is to iterate over each ref using "git for-each-ref --format='%(refname)' 'refs/heads/*'", then run "git merge-base $i new", run git rev-list $mb..new|wc -l and then you could decide what is the first commit that does not belong to any other branch. But that's just an idea, I don't have the motivation to script it properly.

Previous: Elijah NewrenNext: Santi Béjar
Message 3 of 10 in “How do I show only log messages for commits on a specific branch?”
  1. bd@bc-bd.orgDec 16, 2009
  2. Elijah NewrenDec 16, 2009
  3. Miklos VajnaDec 16, 2009
  4. Santi BéjarDec 16, 2009
  5. Elijah NewrenDec 17, 2009
  6. Elijah NewrenDec 16, 2009
  7. Miklos VajnaDec 17, 2009
  8. Stefan VölkelDec 17, 2009
  9. David RodenDec 17, 2009
  10. Pat NotzDec 17, 2009

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.