From ddb1e04e741bb6f1d8a159367c1bc123d387c87d Mon Sep 17 00:00:00 2001 From: Seth Mason Date: Fri, 16 Oct 2015 12:00:23 -0700 Subject: Remove a awk calls Turns out it had a bug when the branch name had a slash in it. --- radar-base.sh | 4 ++-- 1 file 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 -- cgit v1.2.3