From: "Christoffer Stjernlöf" <a@xkqr.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Bug: git branch returns EXIT_SUCCESS when no branches found
Date: Wed, 24 Apr 2019 10:47:09 +0000 [thread overview]
Message-ID: <871s1rissy.fsf@xkqr.org> (raw)
In-Reply-To: <xmqqmukf1yh9.fsf@gitster-ct.c.googlers.com>
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
Dear Junio,
Junio C Hamano (gitster@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 with how git branch is designed to work! What might I be
missing?
Junio C Hamano (gitster@pobox.com) 2019-04-24:
> If you want to ask "does the tip of $DEV_BRANCH reach commit
> 'master'?", the right way would probably be to ask
>
> 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"B
> git --no-pager log "master..$DEV_BRANCH" --
> fi
This seems like a more convenient command for my current purpose,
although it's not a complete replacement for git branch. Thank you!
Sincerely yours,
Christoffer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2019-04-24 10:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 10:13 Bug: git branch returns EXIT_SUCCESS when no branches found Christoffer Stjernlöf
2019-04-24 10:36 ` Junio C Hamano
2019-04-24 10:44 ` Junio C Hamano
2019-04-24 10:53 ` Christoffer Stjernlöf
2019-04-24 10:47 ` Christoffer Stjernlöf [this message]
2019-04-24 11:11 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871s1rissy.fsf@xkqr.org \
--to=a@xkqr.org \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).