summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-11-05 12:22:07 +0000
committerMichael Allen <michael@michaelallen.io>2015-11-05 12:22:07 +0000
commitf359285965f67c679c83b6c2b7128d713c9b3ca9 (patch)
tree9c2dfe34c6fc1db701344aa57f3d441f6d49c03f
parent47addd8b811e77f3be815fea56bcaeddd89edea0 (diff)
parentf085dc8445319c4282b67ff3698d7d7b5b319d3f (diff)
downloadgit-sonar-f359285965f67c679c83b6c2b7128d713c9b3ca9.tar.gz
git-sonar-f359285965f67c679c83b6c2b7128d713c9b3ca9.zip
Merge pull request #89 from colinsf/untracked-branch-fix
Redirect Branch Lookup Error Output
-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