summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2010-03-18 05:10:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-20 14:25:02 (GMT)
commit0d12e59f636b68964c80a82a58020d34a6cd5032 (patch)
tree29b579238046f696f83496afb5e37a327d292941 /git-pull.sh
parent7d182f52f1a754bdccb2e7c7cea54f773f76bc5c (diff)
downloadgit-0d12e59f636b68964c80a82a58020d34a6cd5032.zip
git-0d12e59f636b68964c80a82a58020d34a6cd5032.tar.gz
git-0d12e59f636b68964c80a82a58020d34a6cd5032.tar.bz2
pull: replace unnecessary sed invocation
Getting the shortened branch name is as easy as using the shell's parameter expansion. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 38331a8..246a3a4 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -41,7 +41,7 @@ strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
log_arg= verbosity=
merge_args=
curr_branch=$(git symbolic-ref -q HEAD)
-curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
+curr_branch_short="${curr_branch#refs/heads/}"
rebase=$(git config --bool branch.$curr_branch_short.rebase)
while :
do