X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-parse-remote.sh;h=9b950be28d75b173ed81d5cf83271e9a8c4e6dff;hb=ef803fd4b09bca707c7c27669a2789bb050b488c;hp=1cc2ba6e09614fa55ad205145a3bdacfb78bf283;hpb=4f93fc745ab4f51339ffb3b0e49a5f28a4c2a337;p=git.git diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 1cc2ba6e0..9b950be28 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="${curr_branch#refs/heads/}" origin=$(git config --get "branch.$curr_branch.remote") echo ${origin:-origin} }