328e67eb00c13e8e1046fde576af390fa61fcac2

Author
Toon Claes <toine@iMacT.local>
Committer
Toon Claes <toine@iMacT.local>
Date

Message

Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index 58d826d0c301f93a806e1d4e9eb6d2cbaf489787..52c7969f37f5e3e51d197a74d9d29c6f3df05d96 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -12,3 +12,11 @@ parse_git_dirty () {
 6   fi
 7 }
 8 
 9+#
10+# Will return the current branch name
11+# Usage example: git pull origin $(current_branch)
12+#
13+function current_branch() {
14+  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
15+  echo ${ref#refs/heads/}
16+}