From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] show-branch: show all local heads when only giving one rev along --topics
Date: Tue, 17 Mar 2015 08:50:48 +0900 [thread overview]
Message-ID: <20150316235048.GA23824@glandium.org> (raw)
In-Reply-To: <1426495086-31507-1-git-send-email-mh@glandium.org>
On Mon, Mar 16, 2015 at 05:38:06PM +0900, Mike Hommey wrote:
> "git show-branch --topics <rev> <revs>..." displays ancestry graph, only
> considering commits that are in all given revs, except the first one.
>
> "git show-branch" displays ancestry graph for all local branches.
>
> Unfortunately, "git show-branch --topics <rev>" only prints out the rev
> info for the given rev, and nothing else, e.g.:
>
> $ git show-branch --topics origin/master
> [origin/master] Sync with 2.3.3
>
> While there is an option to add all remote-tracking branches (-r), and
> another to add all local+remote branches (-a), there is no option to add
> only local branches. Adding such an option could be considered, but a
> user would likely already expect that the above command line considers
> the lack of rev other than for --topics as meaning all local branches,
> like when there is no argument at all.
>
> Moreover, when using -r and -a along with --topics, the first local or
> remote-tracking branch, depending on alphabetic order is used instead of
> the one given after --topics (any rev given on the command line is
> actually simply ignored when either -r or -a is given). And if no rev is
> given at all, the fact that the first alphetical branch is the base of
> topics is probably not expected by users (Maybe --topics should always
> require one rev on the command line?)
>
> This change makes
> "show-branch --topics $rev"
> act as
> "show-branch --topics $rev $(git for-each-ref refs/heads
> --format='%(refname:short)')"
>
> "show-branch -r --topics $rev ..."
> act as
> "show-branch --topics $rev ... $(git for-each-ref refs/remotes
> --format='%(refname:short)')"
> instead of
> "show-branch --topics $(git for-each-ref refs/remotes
> --format='%(refname:short)')"
>
> and
> "show-branch -a --topics $rev ..."
> act as
> "show-branch --topics $rev ... $(git for-each-ref refs/heads refs/remotes
> --format='%(refname:short)')"
> instead of
> "show-branch --topics $(git for-each-ref refs/heads refs/remotes
> --format='%(refname:short)')"
Sorry, this was missing:
Signed-off-by: Mike Hommey <mh@glandium.org>
Mike
next prev parent reply other threads:[~2015-03-16 23:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 8:38 [PATCH] show-branch: show all local heads when only giving one rev along --topics Mike Hommey
2015-03-16 23:50 ` Mike Hommey [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-03-30 22:12 Mike Hommey
2015-03-30 22:24 ` Junio C Hamano
2015-03-30 22:34 ` Junio C Hamano
2015-03-30 22:37 ` Mike Hommey
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=20150316235048.GA23824@glandium.org \
--to=mh@glandium.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.
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 NNTP newsgroup(s).