From 85cdbb458956e1e9385be742e01108cfef921364 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Mon, 9 Mar 2015 10:49:32 +0000 Subject: sped up remote_branch_name by not needing to call branch_name --- git-base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-base.sh') diff --git a/git-base.sh b/git-base.sh index a110056..d6401e5 100755 --- a/git-base.sh +++ b/git-base.sh @@ -125,7 +125,7 @@ readable_branch_name() { remote_branch_name() { if is_repo; then - local remoteBranch="$(git for-each-ref --format='%(upstream:short)' refs/heads | grep "$(branch_name)")" + local remoteBranch="$(git for-each-ref --format='%(upstream:short)' refs/heads "$(git symbolic-ref -q HEAD)" )" if [[ -n $remoteBranch ]]; then echo $remoteBranch return 0 -- cgit v1.2.3