diff options
-rw-r--r-- | git-parse-remote.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 1cc2ba6e09..d3782d9559 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -55,7 +55,8 @@ get_remote_url () { } get_default_remote () { - curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||') + curr_branch=$(git symbolic-ref -q HEAD) + curr_branch="${cur_branch#refs/heads/}" origin=$(git config --get "branch.$curr_branch.remote") echo ${origin:-origin} } |