all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Mathias Megyei <mathias@mnet-mail.de>,
	Yuri Khan <yuri.v.khan@gmail.com>,
	Stephen Berman <stephen.berman@gmx.net>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: git log question
Date: Thu, 30 Nov 2017 15:21:03 +0000	[thread overview]
Message-ID: <CAFyQvY1E3Te=iNxABg+F5pL9HAWHg2XXvxs1BO0L+eOq-necKA@mail.gmail.com> (raw)
In-Reply-To: <87efofrelv.fsf@linux-m68k.org>

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

On Thu, Nov 30, 2017 at 10:06 AM Andreas Schwab <schwab@linux-m68k.org>
wrote:

> On Nov 30 2017, Stephen Berman <stephen.berman@gmx.net> wrote:
>
> > Thanks, but this does do what I want.  For example, when I invoke `git
> > branch --contains b407c521f2' on emacs-26 (here currently at
> > 408862f02a), it outputs `master', but when I invoke `git merge-base
> > --is-ancestor b407c521f2 HEAD && git log -1 b407c521f2' on emacs-26, it
> > outputs nothing;
>
> That's correct, b407c521f2 is only reachable from master.  So this is
> exactly what you were looking for.
>

I am just chiming in to mention Magit as I am surprised why no one else has
mentioned it yet.

See how easy it is to figure out such things (and many more git things) in
Magit:

1. Do M-x magit-status in emacs repo
2. Hit 'lb' to view the log of all branches (that gives the buffer on the
left you see in the below image).
3. C-s b407c521f2 (the commit you are interested in).
4. Hit RET
5. Boom! The commit details show up in the buffer you see in the right in
the below linked image. Notice the yellow highlighted "master". Only
"master" and few other branches are listed there.. but *not* "emacs-26". So
that commit is only on "master". If a commit were on both branches, both
would be listed on that row.

And the image..https://i.imgur.com/ec9izl4.png

That is one way to do that.. you could have alternatively just follow the
branching graphics/ascii art in that log view buffer to figure out that
that commit was only on origin/master and not on origin/emacs-26.

(no need to memorize cryptic git commands)
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2649 bytes --]

  reply	other threads:[~2017-11-30 15:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 10:00 git log question Stephen Berman
2017-11-30 11:30 ` Mathias Megyei
2017-11-30 12:02   ` Stephen Berman
2017-11-30 13:15     ` Yuri Khan
2017-11-30 14:19       ` Stephen Berman
2017-11-30 14:59         ` Noam Postavsky
2017-11-30 15:05         ` Yuri Khan
2017-11-30 15:05         ` Andreas Schwab
2017-11-30 15:21           ` Kaushal Modi [this message]
2017-11-30 15:25             ` Andreas Schwab
2017-11-30 15:35             ` Noam Postavsky
2017-11-30 17:46             ` Clément Pit-Claudel
2017-11-30 17:59               ` Kaushal Modi
2017-11-30 17:06         ` Davis Herring
2017-11-30 19:11           ` Stephen Berman
2017-11-30 14:28 ` Herring, Davis
2017-11-30 14:37   ` Stephen Berman
2017-11-30 15:57 ` Eli Zaretskii
2017-11-30 19:10   ` Stephen Berman

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='CAFyQvY1E3Te=iNxABg+F5pL9HAWHg2XXvxs1BO0L+eOq-necKA@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mathias@mnet-mail.de \
    --cc=schwab@linux-m68k.org \
    --cc=stephen.berman@gmx.net \
    --cc=yuri.v.khan@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.