summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mason <smason@edgecast.com>2015-10-16 12:00:23 -0700
committerSeth Mason <smason@edgecast.com>2015-10-16 12:04:25 -0700
commitddb1e04e741bb6f1d8a159367c1bc123d387c87d (patch)
tree3efee570e1fdb3e1231c527aec6e8b1f10c07193
parent73e5767e91ea0976e7c98a24bc284b7ca2756f35 (diff)
downloadgit-sonar-ddb1e04e741bb6f1d8a159367c1bc123d387c87d.tar.gz
git-sonar-ddb1e04e741bb6f1d8a159367c1bc123d387c87d.zip
Remove a awk calls
Turns out it had a bug when the branch name had a slash in it.
-rwxr-xr-xradar-base.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 9527343..653f980 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -198,9 +198,9 @@ branch_ref() {
remote_branch_name() {
local localRef="$(branch_name)"
- local remote="$(git config --get-regexp "^branch\.$localRef\.remote" | awk '{print $2}')"
+ local remote="$(git config --get "branch.$localRef.remote")"
if [[ -n $remote ]]; then
- local remoteBranch="$(git config --get-regexp "^branch\.${localRef}\.merge" | awk -F'/' '{print $NF}')"
+ local remoteBranch="$(git config --get "branch.${localRef}.merge" | sed -e 's/^refs\/heads\///')"
if [[ -n $remoteBranch ]]; then
printf '%s/%s' $remote $remoteBranch
return 0