]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-parse-remote.sh
Merge branch 'maint'
[thirdparty/git.git] / git-parse-remote.sh
index e7013f7ba72a64ab24b991846755b6d6c068b37a..91688792a2eb28d6f6a84fae81f1ae390bd49b45 100644 (file)
@@ -5,7 +5,8 @@
 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="${cur_branch#refs/heads/}"
        origin=$(git config --get "branch.$curr_branch.remote")
        echo ${origin:-origin}
 }