My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90cff96
)
parse-remote: replace unnecessary sed invocation
author
Stephen Boyd
<bebarino@gmail.com>
Wed, 30 Mar 2011 08:48:40 +0000
(
01:48
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 30 Mar 2011 18:42:08 +0000
(11:42 -0700)
Just use parameter expansion instead.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-parse-remote.sh
patch
|
blob
|
history
diff --git
a/git-parse-remote.sh
b/git-parse-remote.sh
index
1cc2ba6
..
d3782d9
100644
(file)
--- 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="${cur_branch#refs/heads/}"
origin=$(git config --get "branch.$curr_branch.remote")
echo ${origin:-origin}
}