From: Alexander Mills <alexander.d.mills@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: check if one branch contains another branch
Date: Thu, 7 May 2020 16:15:12 -0700 [thread overview]
Message-ID: <CA+KyZp6CBJse9jRYowgkaRctuRU4mnFz3TVwkKTwkZWkjj3GTA@mail.gmail.com> (raw)
In-Reply-To: <CA+KyZp6pvqqNnOOj0ap9ekPdv9mZg2u_NQuwFgMXfwfV17SrYQ@mail.gmail.com>
I tried this:
git checkout origin/dev
# now in detached head state
git branch --contains "$(git rev-parse "$feature_branch")"
and I got this output:
<name of feature branch>
not sure what that means
On Thu, May 7, 2020 at 4:12 PM Alexander Mills
<alexander.d.mills@gmail.com> wrote:
>
> so it would be:
>
> feature_branch='my_branch' # the branch that I want to ensure is
> completely merged into origin/dev
> git merge-base origin/dev --is-ancestor "$feature_branch"
>
> that won't work? since git merge-base only works with current branch?
>
> On Thu, May 7, 2020 at 4:08 PM Junio C Hamano <gitster@pobox.com> wrote:
> >
> > Alexander Mills <alexander.d.mills@gmail.com> writes:
> >
> > > I am looking for a command:
> > >
> > > 1> if branch x contains branch y
> > >
> > > right now all I can find is
> > >
> > > 2> if current branch contains commit y
> > >
> > > can someone please accomplish #1 ?
> >
> > Study "git merge-base --is-ancestor" perhaps?
>
>
>
> --
> Alexander D. Mills
> New cell phone # (415)730-1805
> linkedin.com/in/alexanderdmills
--
Alexander D. Mills
New cell phone # (415)730-1805
linkedin.com/in/alexanderdmills
next prev parent reply other threads:[~2020-05-07 23:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 22:59 check if one branch contains another branch Alexander Mills
2020-05-07 23:08 ` Junio C Hamano
2020-05-07 23:12 ` Alexander Mills
2020-05-07 23:15 ` Alexander Mills [this message]
2020-05-07 23:24 ` brian m. carlson
2020-05-07 23:28 ` Alexander Mills
2020-05-07 23:47 ` brian m. carlson
2020-05-07 23:31 ` Randall S. Becker
2020-05-07 23:37 ` Alexander Mills
2020-05-07 23:41 ` Junio C Hamano
2020-05-08 1:01 ` Alexander Mills
2020-05-08 12:07 ` Randall S. Becker
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=CA+KyZp6CBJse9jRYowgkaRctuRU4mnFz3TVwkKTwkZWkjj3GTA@mail.gmail.com \
--to=alexander.d.mills@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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.