From: John Keeping <john@keeping.me.uk>
To: Francis Moreau <francis.moro@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Question about "git log --cherry"
Date: Thu, 26 Sep 2013 21:21:53 +0100 [thread overview]
Message-ID: <20130926202153.GC27238@serenity.lan> (raw)
In-Reply-To: <CAC9WiBjLqdqSKgLv_M6FPx3a2J-+ZKAQnk9OGn3h5SfqSpiT3g@mail.gmail.com>
On Thu, Sep 26, 2013 at 06:35:57PM +0200, Francis Moreau wrote:
> I'm trying to use "git log --cherry ..." in order to display new, kept
> and removed commits between two branches A and B.
>
> So commits which are only in B are considered new and should be marked
> with '+'. Commits which are in both branches are marked with '=' but
> only commit in branch B are shown. Eventually commits which are in A
> but not in B anymore should be marked with '-'.
>
> So far I found this solution:
>
> $ git log --cherry-mark --right-only A...B
> $ git log --cherry-pick --left-only A...B
>
> but I have to call twice git-log. This can be annoying since depending
> on A and B, calling git-log can take time.
>
> Is there another option that I'm missing which would do the job but
> with only one call to git-log ?
Does this do what you want?
git log --cherry-mark --left-right A...B |
sed -e '/^commit / {
y/<>/-+/
}'
next prev parent reply other threads:[~2013-09-26 20:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 16:35 Question about "git log --cherry" Francis Moreau
2013-09-26 20:21 ` John Keeping [this message]
2013-09-27 5:09 ` Francis Moreau
2013-09-27 8:11 ` John Keeping
2013-09-27 8:28 ` Francis Moreau
2013-09-27 9:14 ` John Keeping
2013-09-27 9:52 ` Francis Moreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130926202153.GC27238@serenity.lan \
--to=john@keeping.me.uk \
--cc=francis.moro@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).