From a8bd7e24348760ebb8b33de8317c9c251df8accb Mon Sep 17 00:00:00 2001 From: Adam Backstrom Date: Sat, 9 Feb 2013 19:07:52 -0500 Subject: [PATCH] More direct retrieval of current branch name --- gitnow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitnow-common b/gitnow-common index 3b7bd3e..3ab778a 100644 --- a/gitnow-common +++ b/gitnow-common @@ -37,7 +37,7 @@ git_remote_branches() { git branch -r --no-color | sed 's/^[* ] //'; } git_all_branches() { ( git branch --no-color; git branch -r --no-color) | sed 's/^[* ] //'; } git_current_branch() { - git branch -l | grep "*" | cut -d " " -f 2 + git rev-parse --abbrev-ref HEAD } git_now_first_commit() {