summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-10-16 11:43:00 +0100
committerMichael Allen <michael@michaelallen.io>2015-10-16 11:51:42 +0100
commita0beb92f7f28fadb8255ee05765497eeb159795b (patch)
tree0f903883201650b18230103ec77e7baf17484365 /radar-base.sh
parent1a856774a1c0d0f6a9957046e90c1c24d253e6a0 (diff)
downloadgit-sonar-a0beb92f7f28fadb8255ee05765497eeb159795b.tar.gz
git-sonar-a0beb92f7f28fadb8255ee05765497eeb159795b.zip
That if statement wasn't doing what I thought it was
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 52043d4..9527343 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -198,19 +198,17 @@ branch_ref() {
remote_branch_name() {
local localRef="$(branch_name)"
- if [[ -n "$localRef" ]]; then
- local remote="$(git config --get-regexp "^branch\.$localRef\.remote" | awk '{print $2}')"
- if [[ -n $remote ]]; then
- local remoteBranch="$(git config --get-regexp "^branch\.${localRef}\.merge" | awk -F'/' '{print $NF}')"
- if [[ -n $remoteBranch ]]; then
- printf '%s/%s' $remote $remoteBranch
- return 0
- else
- return 1
- fi
+ local remote="$(git config --get-regexp "^branch\.$localRef\.remote" | awk '{print $2}')"
+ if [[ -n $remote ]]; then
+ local remoteBranch="$(git config --get-regexp "^branch\.${localRef}\.merge" | awk -F'/' '{print $NF}')"
+ if [[ -n $remoteBranch ]]; then
+ printf '%s/%s' $remote $remoteBranch
+ return 0
else
- return 1
+ return 1
fi
+ else
+ return 1
fi
}