Created
October 3, 2010 22:13
-
-
Save cbrammer/608997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Regex to parse "git branch -a -vv" | |
(\*)? +(.*?) +(.*?)? ((\[(.*?)(: (.*?) (\d+))?\])? ?(.*$))? | |
// 0 the whole thing | |
// 1 if there is a * (active) | |
// 2 branch name | |
// optional after this | |
// 3 most recent commit short sha | |
// 4-5 ignore | |
// 6 tracking brack name | |
// 7 where it is in relation to the tracking branch, ignore | |
// 8 ahead or behind | |
// 9 how many ahead or mehing | |
// 10 most recent commit message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment