diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index e7013f7ba72a64ab24b991846755b6d6c068b37a..ea093d251d98af6a3d4df19e900d56df34d51572 100644 (file)
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
GIT_DIR=$(git rev-parse -q --git-dir) || :;
get_default_remote () {
- curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
+ curr_branch=$(git symbolic-ref -q HEAD)
+ curr_branch="${curr_branch#refs/heads/}"
origin=$(git config --get "branch.$curr_branch.remote")
echo ${origin:-origin}
}