emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git log question


From: Stephen Berman
Subject: Re: git log question
Date: Thu, 30 Nov 2017 13:02:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Thu, 30 Nov 2017 12:30:07 +0100 Mathias Megyei <address@hidden> wrote:

> On 11/30/2017 11:00 AM, Stephen Berman wrote:
>> I thought if I call `git log <commit> -1' on the current branch, it will
>> only show <commit> if it is in the current branch,
>
> When you want to know whether <commit> (originally committed to emacs-26) has
> been merged into master or any other local branch then you can use
>   git branch --contains <commit>
> In order to list remote tracking branches please add option '-r'
>   git branch -r --contains <commit>

Thanks, but that doesn't answer my question.  I want to call `git
<command> <commit>' on a branch and see the commit only if it is indeed
on that branch, not on some other branch in the repository.  From your
reply, it appears that git does not have such a command, but I have to
first call `git branch --contains <commit>' and, if it shows the branch
I want, then call `git log <commit> -1'.  If so, fine, though a bit
disappointing it's not more straightforward.

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]