From 43e6488025cad65ecb5aa25d45d922236b33bd1e Mon Sep 17 00:00:00 2001 From: Ron Shapiro Date: Tue, 2 Sep 2014 15:36:19 -0400 Subject: [PATCH] Allow `current_branch` to be used in subdirectories of a git repo --- plugins/git/git.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index bb1978f78..fb5662e07 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -125,7 +125,6 @@ alias gsd='git svn dcommit' # Usage example: git pull origin $(current_branch) # function current_branch() { - if [ ! -d .git ]; then return; fi ref=$(git symbolic-ref HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo ${ref#refs/heads/}