From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: git log question Date: Thu, 30 Nov 2017 15:21:03 +0000 Message-ID: References: <87bmjkgk6h.fsf@gmx.net> <920d2cc0-a9b8-b740-1b4a-51403a790f90@mnet-mail.de> <87wp28c6ul.fsf@gmx.net> <87shcvdf27.fsf@gmx.net> <87efofrelv.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c135c9c8f4715055f34cd3c" X-Trace: blaine.gmane.org 1512055335 16303 195.159.176.226 (30 Nov 2017 15:22:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2017 15:22:15 +0000 (UTC) Cc: Mathias Megyei , Yuri Khan , Stephen Berman , Emacs developers To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 30 16:22:10 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKQf8-0003dA-4s for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2017 16:22:06 +0100 Original-Received: from localhost ([::1]:48831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKQfF-0000VR-Fc for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2017 10:22:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKQeL-0000TQ-JQ for emacs-devel@gnu.org; Thu, 30 Nov 2017 10:21:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKQeK-0007Oc-GZ for emacs-devel@gnu.org; Thu, 30 Nov 2017 10:21:17 -0500 Original-Received: from mail-yb0-x22b.google.com ([2607:f8b0:4002:c09::22b]:46834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKQeK-0007NE-Ae for emacs-devel@gnu.org; Thu, 30 Nov 2017 10:21:16 -0500 Original-Received: by mail-yb0-x22b.google.com with SMTP id g187so2806986yba.13 for ; Thu, 30 Nov 2017 07:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f0+HxSiYtfngCtrmi+3heTiE1teyqyMAR6t/gkB0EgI=; b=m5t5v0i/62De5f80FYVZoc2nJB7zzxaTLVKdbJIx9+3mwL/hgigTvplYENxbvLwnBE 062ZWUyQRxdV750ZkjtrrSxMZuiXj2zmVKPLr9oAJXxj4+WxB/yf9tvVjA4d1nRBJRcH 1i+umVu2z63mvING1fkLmfFy76ejkMlf0FCQwaUerS4YYnoPn1u8etTbah3QWxNqV9xv +TFZdyMg08oiS21RmezE7D6+D2l/W3X4ZupGyGcwikvzPAireFO9sqaR0XpPGDuFs3WT 8JHDrm9IbnFNi18w5djZ6UIF/O2iRJJ+lWBJh1am9lPcB3MJSN1q0LiVeiHkPGOTgdn+ MCgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f0+HxSiYtfngCtrmi+3heTiE1teyqyMAR6t/gkB0EgI=; b=A1PR4zd+mnWurrzgIF5wcJkrNwXnLTKd3rnrOCpa95D3aJLzr/q6YaLLM3s3Pa2ER7 qNj3sKDj3Iyhq/3OWbzh9UWn92GiyvTFAH3va+PzKro0PKnTjW/Uisx4ghjkdeqMXwih NeKe2S28Q2LMsSF7Kuci5K0Hl4uxJrxPCAFEpsWRh25nMINlMxiKhTVgaZtyvEXfCOIb TFVrwcSsplBHI2XA9qBfRq3p9pZfDT5puri8x3VesLwwpqcmcoNimktLzIDHb9f1o2OI +s5eYVJKnc6xFVf9Z23pGyWb2XQGgnaVFT2kcaRlLf4IG6tDkzD1frmNzypSVrGU9wHU m1EA== X-Gm-Message-State: AJaThX5RdsSS5d7Y2olczYG6aNV9Bh4pIeQO6CyLMtdPcSOxQ00R2Ahh YkF30B6G2StZP2/vWEmoVUHP108Bsa9lRpHbIOQ= X-Google-Smtp-Source: AGs4zMZjyDold7cat0/ob3Ifg81WWzP/SqE31xjSNJfc8ibNPpJAUSQVTtpizQUPFx23WbEJGWAD/uY71rLj46rfnVY= X-Received: by 10.37.161.1 with SMTP id z1mr1749267ybh.499.1512055275208; Thu, 30 Nov 2017 07:21:15 -0800 (PST) In-Reply-To: <87efofrelv.fsf@linux-m68k.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220549 Archived-At: --94eb2c135c9c8f4715055f34cd3c Content-Type: text/plain; charset="UTF-8" On Thu, Nov 30, 2017 at 10:06 AM Andreas Schwab wrote: > On Nov 30 2017, Stephen Berman 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 --94eb2c135c9c8f4715055f34cd3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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.=C2=A0 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-bas= e
> --is-ancestor b407c521f2 HEAD && git log -1 b407c521f2' on= emacs-26, it
> outputs nothing;

That's correct, b407c521f2 is only reachable from master.=C2=A0 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 men= tioned it yet.

See how easy it is to figure out such things (and many mor= e 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! Th= e commit details show up in the buffer you see in the right in the below li= nked image. Notice the yellow highlighted "master". Only "ma= ster" 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.


That is one way t= o 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 com= mands)
--

Kaushal Modi

--94eb2c135c9c8f4715055f34cd3c--