On Wed, Apr 24, 2019 at 07:36:34PM +0900, Junio C Hamano wrote:
> if git merge-base --is-ancestor master "$DEV_BRANCH"
> then
> echo "master is an ancestor of $DEV_BRANCH"
> else
> echo "master has commits not in $DEV_BRANCH"
> git --no-pa
Dear Junio,
Junio C Hamano (gits...@pobox.com) 2019-04-24:
> if cs/topic branch does not exist, of if the branch
> does not contain 'master', the command will show "here are the
> branches that match the criteria you gave me" by giving no lines in
> its standard output, and exits with 0 to signal
Dear Junio,
Junio C Hamano (gits...@pobox.com) 2019-04-24:
> This invocation is not in line with how "git branch" subcommand is
> designed to work.
This is fair. I completely accept a "you're wielding it wrong" answer!
However, your explanation sounds to me like that invocation is exactly
in line
Junio C Hamano writes:
> The list mode ...
> ... can
> also limit the branches whose tip commits can reach a named commit
> with the "--contains".
>
> $ DEV_BRANCH=cs/topic
> $ git branch --contains master "$DEV_BRANCH"
>
> asks the subcommand to show only the branches that can reach
a...@xkqr.org (Christoffer Stjernlöf) writes:
> A common use case of git branch – for me – is to use it to test whether
> a particular branch satisfies some conditions. A recent example is this:
>
> if ! git branch "$DEV_BRANCH" --contains master; then
This invocation is not in line with how
Dear Sirs/Madams,
A common use case of git branch – for me – is to use it to test whether
a particular branch satisfies some conditions. A recent example is this:
if ! git branch "$DEV_BRANCH" --contains master; then
echo "The development branch ($DEV_BRANCH) is not up to date"
6 matches
Mail list logo