summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Scott-Fleming <colinsf@email.arizona.edu>2015-11-01 11:04:20 -0700
committerColin Scott-Fleming <colinsf@email.arizona.edu>2015-11-01 11:04:20 -0700
commitf085dc8445319c4282b67ff3698d7d7b5b319d3f (patch)
tree9c2dfe34c6fc1db701344aa57f3d441f6d49c03f
parent47addd8b811e77f3be815fea56bcaeddd89edea0 (diff)
downloadgit-sonar-f085dc8445319c4282b67ff3698d7d7b5b319d3f.tar.gz
git-sonar-f085dc8445319c4282b67ff3698d7d7b5b319d3f.zip
bury error output from remote branch lookup
closes #88 closes #86
-rwxr-xr-xradar-base.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 099debd..517a6ce 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -249,7 +249,7 @@ remote_branch_name() {
commits_behind_of_remote() {
remote_branch=${1:-"$(remote_branch_name)"}
if [[ -n "$remote_branch" ]]; then
- git rev-list --left-only --count ${remote_branch}...HEAD
+ git rev-list --left-only --count ${remote_branch}...HEAD 2>/dev/null
else
printf '%s' "0"
fi
@@ -258,7 +258,7 @@ commits_behind_of_remote() {
commits_ahead_of_remote() {
remote_branch=${1:-"$(remote_branch_name)"}
if [[ -n "$remote_branch" ]]; then
- git rev-list --right-only --count ${remote_branch}...HEAD
+ git rev-list --right-only --count ${remote_branch}...HEAD 2>/dev/null
else
printf '%s' "0"
fi