From: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [question] how can i verify whether a local branch is tracking a remote branch?
Date: Tue, 7 Apr 2009 00:00:20 +0200 [thread overview]
Message-ID: <4d8e3fd30904061500m7857f0f1i2b76a2113f30c562@mail.gmail.com> (raw)
In-Reply-To: <20090406212516.GA882@coredump.intra.peff.net>
On 4/6/09, Jeff King <peff@peff.net> wrote:
> On Mon, Apr 06, 2009 at 10:30:21AM +0200, Paolo Ciarrocchi wrote:
>> I mean something like:
>> $ git branch
>> * foo <-> origin/foo
>>
>> What do you think?
>
> Ah. Well, if you just want it for human consumption, that is much
> easier. :) That information is already shown by "git status":
>
> $ git status
> # On branch next
> # Your branch is ahead of 'origin/next' by 8 commits.
> ...
right, but it can only ne used for the current branch.
> "git branch -v" is already looking at the information, but it
> prints only the "ahead/behind" summary. E.g.,:
>
> $ git branch -v
> bar 1e0672d [behind 5] some commit
> * baz dccc1cd [ahead 1, behind 3] other commit
> foo 787d5a8 [ahead 1] another commit
> master a0e632e actual upstream master
>
> It would be pretty trivial to make it do something fancier. The
> (extremely rough) patch below shows the tracking branch when
> double-verbosity is given:
>
> $ git branch -vv
> * next 2d44318 [origin/next: ahead 9] branch -vv wip
I like it!
> So the questions are:
>
> - is this worth it? The verbose information is already available via
> git status, but only for the current branch.
I think it's a very usefull information.
I feel like it would be nice to have this information being part of
the basic git branch output and not associated to the -vv option.
> - should it be the default with "-v", or require "-vv"? It take up a
> bit of screen real estate, which is already in short supply for
> "branch -v"
How about be just part of the default git branch output?
> - in both the "status" and "branch" cases, we show nothing if they
> are equivalent. I guess you would want to see
>
> * next 2d44318 [origin/next] branch -vv wip
>
> or
>
> * next 2d44318 [origin/next: uptodate] branch -vv wip
Sure.
Thanks!
Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
http://mypage.vodafone.it/
next prev parent reply other threads:[~2009-04-06 22:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 10:32 [question] how can i verify whether a local branch is tracking a remote branch? Paolo Ciarrocchi
2009-04-05 14:44 ` Jeff King
2009-04-05 21:25 ` Paolo Ciarrocchi
2009-04-06 4:34 ` Jeff King
2009-04-06 5:28 ` Junio C Hamano
2009-04-06 5:49 ` Jeff King
2009-04-06 8:30 ` Paolo Ciarrocchi
2009-04-06 21:25 ` Jeff King
2009-04-06 22:00 ` Paolo Ciarrocchi [this message]
2009-04-07 4:41 ` Jeff King
2009-04-06 12:00 ` Michael J Gruber
2009-04-06 21:29 ` Jeff King
2009-04-07 7:59 ` Michael J Gruber
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=4d8e3fd30904061500m7857f0f1i2b76a2113f30c562@mail.gmail.com \
--to=paolo.ciarrocchi@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).