git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Enhanced git branch list (proposal)
@ 2012-07-23 18:17 John Bartholomew
  2012-07-23 18:32 ` Thomas Rast
  2012-07-24 16:40 ` Phil Hord
  0 siblings, 2 replies; 3+ messages in thread
From: John Bartholomew @ 2012-07-23 18:17 UTC (permalink / raw)
  To: git

I find the output of `git branch' to be quite bare, and would like to
see more information; most importantly, what the state of the branch
is in relation to its upstream. For some time I have been using my
own script to do this. It produces output like this:

$ git lsb
  commodity-market-lua [behind 'brianetta/commodity-market-lua' by 2
commits]
  filesystem [up-to-date with 'jpab/filesystem']
  fix-ring-blending [ahead of 'jpab/fix-ring-blending' by 1 commit]
  galaxy-refactor
  galaxy-refactor-2 [diverged from 'jpab/galaxy-refactor', by 6
commits/626 commits (us/them)]
  hud-pitch-ladder [up-to-date with 'jpab/hud-pitch-ladder']
= issue-1388
  issue-695
  lmr-mtllib-improvements
  marcel-stations
* master [up-to-date with 'jpab/master']
  refcounted-body [up-to-date with 'jpab/refcounted-body']
  string-formatter [up-to-date with 'jpab/string-formatter']

The first column indicates the relation to HEAD: '*' marks the current
head, '=' marks a branch which is identical with the current HEAD.

Branches which have a configured upstream (branch.remote and
branch.merge are set) show the relation to the corresponding remote
branch.

Some key text ('up-to-date', 'ahead', 'behind' or 'diverged', and the
name of the current HEAD) is displayed with colour if colour is
enabled.

Arguments can be passed to show remote branches (for all remotes, or
for a specified remote), or all branches, and to show each branch
in relation to a specified target branch instead of the configured
remote tracking branch.

I would like to know whether there is any interest in incorporating
this functionality into the main git distribution, either as a
separate command, or within `git branch'. For my purposes I have it
aliased under the name `git lsb' for `list branches'.

You can examine the script I'm using for this at:

https://github.com/johnbartholomew/gitvoodoo/blob/master/bin/git-xbranch

Regards,

John B

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Enhanced git branch list (proposal)
  2012-07-23 18:17 Enhanced git branch list (proposal) John Bartholomew
@ 2012-07-23 18:32 ` Thomas Rast
  2012-07-24 16:40 ` Phil Hord
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Rast @ 2012-07-23 18:32 UTC (permalink / raw)
  To: John Bartholomew; +Cc: git

John Bartholomew <jpa.bartholomew@gmail.com> writes:

> I find the output of `git branch' to be quite bare, and would like to
> see more information; most importantly, what the state of the branch
> is in relation to its upstream.

That is already present: just run git branch -vv.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Enhanced git branch list (proposal)
  2012-07-23 18:17 Enhanced git branch list (proposal) John Bartholomew
  2012-07-23 18:32 ` Thomas Rast
@ 2012-07-24 16:40 ` Phil Hord
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Hord @ 2012-07-24 16:40 UTC (permalink / raw)
  To: John Bartholomew; +Cc: git

On Mon, Jul 23, 2012 at 2:17 PM, John Bartholomew
<jpa.bartholomew@gmail.com> wrote:
>
> I find the output of `git branch' to be quite bare, and would like to
> see more information; most importantly, what the state of the branch
> is in relation to its upstream. For some time I have been using my
> own script to do this. It produces output like this:
>
> $ git lsb
>   commodity-market-lua [behind 'brianetta/commodity-market-lua' by 2
> commits]
>   filesystem [up-to-date with 'jpab/filesystem']
>   fix-ring-blending [ahead of 'jpab/fix-ring-blending' by 1 commit]
>   galaxy-refactor
>   galaxy-refactor-2 [diverged from 'jpab/galaxy-refactor', by 6
> commits/626 commits (us/them)]
>   hud-pitch-ladder [up-to-date with 'jpab/hud-pitch-ladder']
> = issue-1388
>   issue-695
>   lmr-mtllib-improvements
>   marcel-stations
> * master [up-to-date with 'jpab/master']
>   refcounted-body [up-to-date with 'jpab/refcounted-body']
>   string-formatter [up-to-date with 'jpab/string-formatter']
>
> The first column indicates the relation to HEAD: '*' marks the current
> head, '=' marks a branch which is identical with the current HEAD.
>
> Branches which have a configured upstream (branch.remote and
> branch.merge are set) show the relation to the corresponding remote
> branch.
>
> Some key text ('up-to-date', 'ahead', 'behind' or 'diverged', and the
> name of the current HEAD) is displayed with colour if colour is
> enabled.
>
> Arguments can be passed to show remote branches (for all remotes, or
> for a specified remote), or all branches, and to show each branch
> in relation to a specified target branch instead of the configured
> remote tracking branch.
>
> I would like to know whether there is any interest in incorporating
> this functionality into the main git distribution, either as a
> separate command, or within `git branch'. For my purposes I have it
> aliased under the name `git lsb' for `list branches'.
>
> You can examine the script I'm using for this at:
> https://github.com/johnbartholomew/gitvoodoo/blob/master/bin/git-xbranch

Thanks.  You might also find this one interesting:

http://masanjin.net/blog/label/git-wtf/

Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-24 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 18:17 Enhanced git branch list (proposal) John Bartholomew
2012-07-23 18:32 ` Thomas Rast
2012-07-24 16:40 ` Phil Hord

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).