Re: How do I show only log messages for commits on a specific branch?
- From
- Santi Béjar <santi@agolina.net>
- Date
- Dec 16, 2009, 23:58 UTC
- Message-ID
- <adf1fd3d0912161558u36d9674eid36e3042d181ed8f@mail.gmail.com>
- In-Reply-To
- <20091216232641.GK25474@genesis.frugalware.org>
On Thu, Dec 17, 2009 at 12:26 AM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 10 quoted lines
> 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.Not out-of-the-box but this does exactly what you said, print all commits only reachable from the "new" branch:
git log new --not $(git for-each-ref --format='%(refname)' 'refs/heads/*' | grep -v refs/heads/new)
For the original question, I think what makes most sense in this case is asking for the commits since the upstream branch. Some time ago there was a discussion about a syntax for the tracking branch and there was even a patch:
Subject: [PATCH v2] Introduce <branch>@{upstream} as shortcut to the
tracked branch
Date: 2009-09-10 15:25:57 GMThttp://news.gmane.org/find-root.php?message_id=%3calpine.DEB.1.00.0909101724520.8306%40pacific.mpi%2dcbg.de%3e
but it's not in git.git.
HTH, Santi