Code

i18n: mark checkout --detach messages for translation
[git.git] / git-parse-remote.sh
index 0ab1192f81217fe22715fd351395e3c9b05c86a0..ea093d251d98af6a3d4df19e900d56df34d51572 100644 (file)
@@ -4,12 +4,9 @@
 # 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}
 }