summaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-30 14:10:41 -0700
committerJunio C Hamano <gitster@pobox.com>2011-03-30 14:10:41 -0700
commit17a02998078923f2d62811326d130de991d1a95a (patch)
treef33b6e5758233f3f7ae05fe0d8565323de381820 /git-parse-remote.sh
parent44a9cedb005b0b8be31dccd8e6ddf97074a01345 (diff)
parent806e0aba2e5d976233703e6ff517af10329e4048 (diff)
downloadgit-17a02998078923f2d62811326d130de991d1a95a.tar.gz
Merge branch 'maint'
* maint: contrib/thunderbird-patch-inline: do not require bash to run the script t8001: check the exit status of the command being tested strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead Typos: t/README Documentation/config.txt: make truth value of numbers more explicit git-pack-objects.txt: fix grammatical errors parse-remote: replace unnecessary sed invocation
Diffstat (limited to 'git-parse-remote.sh')
-rw-r--r--git-parse-remote.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index e7013f7ba7..91688792a2 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -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}
}