From: Stephen Boyd Date: Thu, 18 Mar 2010 05:10:45 +0000 (-0700) Subject: pull: replace unnecessary sed invocation X-Git-Tag: v1.7.0.3~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0d12e59f636b68964c80a82a58020d34a6cd5032;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-pull.sh b/git-pull.sh index 38331a861..246a3a4b3 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