milkbikis/powerline-shell — pull request #136 by MartinWetterwald (2014-03-10 16:28:25+00:00)
Title: Feature/gitsegment

Hello,
This branch enhances the git segment with detailed "git status" overview in the prompt.
- Number of commits behind remote tracking branch
- Number of commits ahead remote tracking branch
- Number of untracked files
- Number of files staged for commit
- Number of files modified but not staged for commit
- Number of conflicted files

- I've improved the detached head mode: currently, when in detached head mode, if there is a tag which describe this commit, the name of the tag is display instead of the sha1. Otherwise, if there is no tag describing HEAD, the sha1 is displayed.

- I've chosen UTF-8 characters for each info.

For the prompt to still be fast, I tried my best to minimize the number of shell commands launched.
In your version, 2 git processes are launched, in my version, I succeed to keep the same number: I only launch 2 git subprocesses, but there is much more info displayed.

I still don't like the default color I chose for "modified but not staged for commit". Do you have a better idea?

This is the longest prompt possible:
![gitsegment_demo](https://f.cloud.github.com/assets/289725/2375934/b823440a-a870-11e3-9742-732f8e2a876f.png)

- The HEAD is detached, and since no tag describes this commit, the sha1 is prinnted, along with an anchor UTF8 character.
- There are 2 files staged for commit
- The are 3 files modified but not stagged for commit
- There is 1 untracked file
- There is 1 conflicted file (unmerged).