branch selection
branch selection - refactor and improvement
msysgit xargs compatibility
error case (No branch found for ref)
indentation (my bad)
Final improvements to Djuuu's branch select patch:

  * lowercase local variable names
  * select the current branch if eligible before defaulting to master
  * add missing ^$ around grep patterns
  * add test for delivery from detached head repo
  * remove leading spaces from "git branch" output
  * clearer error message when no branch found
  * restored exit code value (16) when no branch found