diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 0ab1192f81217fe22715fd351395e3c9b05c86a0..ea093d251d98af6a3d4df19e900d56df34d51572 100644 (file)
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
# this would fail in that case and would issue an error message.
GIT_DIR=$(git rev-parse -q --git-dir) || :;
-get_remote_url () {
- git ls-remote --get-url "$1"
-}
-
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}
}