Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
moved to github --> https://github.com/bill-auger/git-branch-status/
@Eldelshell

This comment has been minimized.

Copy link

Eldelshell commented Nov 6, 2014

+1 Love it!

@knovoselic

This comment has been minimized.

Copy link

knovoselic commented Jan 16, 2015

Great job, thanks for sharing!

@bill-auger

This comment has been minimized.

Copy link
Owner Author

bill-auger commented Mar 6, 2015

oh hey fellas glad yas like it - i find this script immensely helpful so i was compelled to enhance it

sry i didnt see the comments earlier - apparently github does not notify anyone of comments to gists

anyways i came back today because i made some additions

my original modifications

  • prettified into columns with adjustable max wdith
  • added ability to filter by branch name and to show locals
  • removed the temp file i/o - runs fully in memory
  • added command-line switches and usage message

this update

  • added '*' indicator near current branch
  • added dates of the last commit beside each branch and upstream

below is a screenshot of the latest version

alt text

@kierun

This comment has been minimized.

Copy link

kierun commented Jul 22, 2015

You just saved me a day's work, thank you! ^_~

@ava-dylang

This comment has been minimized.

Copy link

ava-dylang commented Oct 19, 2015

Awesome, but doesn't appear the --dates flag can be used with the --all flag :(

@bill-auger

This comment has been minimized.

Copy link
Owner Author

bill-auger commented Jan 19, 2016

@ava-dylang - yes the cli parsing is very crude and that is preciecely why i added the -v --verbose switch for now - see USAGE above or branch-status --help

@bill-auger

This comment has been minimized.

Copy link
Owner Author

bill-auger commented Jan 19, 2016

new version

  • added --remotes CLI switch for listing all remotes (also -a and --all)
@mikea

This comment has been minimized.

Copy link

mikea commented Mar 24, 2016

For some reason this script replace '_' in branch name by space. Is this intentional? Can it be fixed?

$ git branch
  arcpatch-D18103
  common_flags
  fuzzer_asan_option
  fuzzer_experiments
  fuzzer_weighted_rnd
  libfuzzer_arbitrary_fun
  libfuzzer_buildgn
  libfuzzer_custom_mutator
  master
  reading_fix
  sancov_cfg
  sancov_dominators
  sancov_frontier
  sancov_function_pct
  sancov_module_style
* sancov_stats
  santizer_coverage_pass_dep
  stl_extra

$ git branch-status -a

  local <-> upstream
  ---------------------------------------------------------------------------
  | arcpatch-D18103            | n/a           | n/a        | (no upstream) |
  | common flags               | (behind 154)  | (ahead 23) | origin/master |
  | fuzzer asan_option         | (behind 1581) | (ahead 15) | origin/master |
  | fuzzer experiments         | (behind 3348) | (ahead 12) | origin/master |
  | fuzzer weighted_rnd        | (behind 2819) | (ahead 1)  | origin/master |
  | libfuzzer arbitrary_fun    | (behind 626)  | (ahead 1)  | origin/master |
  | libfuzzer buildgn          | (behind 806)  | (ahead 1)  | origin/master |
  | libfuzzer custom_mutator   | (behind 382)  | (ahead 1)  | origin/master |
  | master                     | (behind 378)  | (even)     | origin/master |
  | reading fix                | (behind 235)  | (even)     | origin/master |
  | sancov cfg                 | (behind 1377) | (ahead 1)  | origin/master |
  | sancov dominators          | (behind 3)    | (ahead 1)  | origin/master |
  | sancov frontier            | (behind 806)  | (ahead 1)  | origin/master |
  | sancov function_pct        | (behind 176)  | (ahead 5)  | origin/master |
  | sancov module_style        | (behind 80)   | (even)     | origin/master |
  | sancov stats               | (even)        | (ahead 1)  | origin/master |
  | santizer coverage_pass_dep | (behind 154)  | (ahead 1)  | origin/master |
  | stl extra                  | (behind 176)  | (ahead 2)  | origin/master |
  ---------------------------------------------------------------------------

  local <-> origin
  ------------------------------
  | Everything is synchronized |
  ------------------------------

@bill-auger

This comment has been minimized.

Copy link
Owner Author

bill-auger commented May 27, 2016

@mikea - sry i did not see this earlier - unfortunately github does not notify anyone of comments to gists so i only see them by looking at this web page explicitly - i have been planning to move this script to github and give it a GPL so that it can have an issue tracker and be properly shared - the original author and contributors have agreed this was a good idea but i have not gotten around to it yet - i will post here when it happens

to answer your question - no it was not intentional - i use dashes instead of underscores so i did not notice - almost certainly can be fixed - i will look into it

@bill-auger

This comment has been minimized.

Copy link
Owner Author

bill-auger commented May 27, 2016

i have created a proper repo for this script on github - please direct future comments to the issue tracker there https://github.com/bill-auger/git-branch-status/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.