sebastianbergmann/git — pull request #9 by andrewmccombe (2014-07-08 14:54:17+00:00)
Title: New implementation of getCurrentBranch() to use "git rev-parse --abbrev-...

...ref HEAD"

The implementation of getCurrentBranch() using 'git status --porcelain --branch' didn't work for me. Running the command in the terminal produced:

git status --porcelain --branch
## task/solr
M composer.json
?? gulpfile.js

The method was ignoring the first line and returned the first letter of the line 2, 'M'.

I have modified this to use 'git rev-parse --abbrev-ref HEAD' which returns a single string.

Also - my first Open Source contribution!