diff options
author | Michael Allen <michael@michaelallen.io> | 2015-03-09 10:49:32 +0000 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-03-09 10:49:32 +0000 |
commit | 85cdbb458956e1e9385be742e01108cfef921364 (patch) | |
tree | b401bcdb3e31d7fcde82046e944c76682f050a85 /git-base.sh | |
parent | d1d362fb8cf03263d259d91215b841c4aea2ac50 (diff) | |
download | git-sonar-85cdbb458956e1e9385be742e01108cfef921364.tar.gz git-sonar-85cdbb458956e1e9385be742e01108cfef921364.zip |
sped up remote_branch_name by not needing to call branch_name
Diffstat (limited to 'git-base.sh')
-rwxr-xr-x | git-base.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |