summaryrefslogtreecommitdiffstats
path: root/git-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-03-09 11:06:44 +0000
committerMichael Allen <michael@michaelallen.io>2015-03-09 11:06:44 +0000
commit38dcfefff66da011a474fa95f96f71a8ae905a5b (patch)
tree14180bc7a9db9d30b5baa09957fcc2e84a404943 /git-base.sh
parent0472c724b11f89365aa0ef86fa794f367c7372f7 (diff)
downloadgit-sonar-38dcfefff66da011a474fa95f96f71a8ae905a5b.tar.gz
git-sonar-38dcfefff66da011a474fa95f96f71a8ae905a5b.zip
ensure remote_branch_name is fails quietly
Diffstat (limited to 'git-base.sh')
-rwxr-xr-xgit-base.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-base.sh b/git-base.sh
index 000b184..94e9070 100755
--- a/git-base.sh
+++ b/git-base.sh
@@ -123,7 +123,7 @@ readable_branch_name() {
remote_branch_name() {
local localRef="$(git symbolic-ref -q HEAD 2>/dev/null)"
- local remoteBranch="$(git for-each-ref --format='%(upstream:short)' refs/heads $localRef )"
+ local remoteBranch="$(git for-each-ref --format='%(upstream:short)' refs/heads $localRef 2>/dev/null)"
if [[ -n $remoteBranch ]]; then
echo $remoteBranch
return 0