From 0d12e59f636b68964c80a82a58020d34a6cd5032 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Wed, 17 Mar 2010 22:10:45 -0700 Subject: [PATCH] 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 --- git-pull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-pull.sh b/git-pull.sh index 38331a8611..246a3a4b37 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 -- 2.11.4.GIT