Browse Source

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>
maint
Stephen Boyd 15 years ago committed by Junio C Hamano
parent
commit
0d12e59f63
  1. 2
      git-pull.sh

2
git-pull.sh

@ -41,7 +41,7 @@ strategy_args= diffstat= no_commit= squash= no_ff= ff_only= @@ -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

Loading…
Cancel
Save