[PATCH] pull: replace unnecessary sed invocation
- From
Stephen Boyd <bebarino@gmail.com>
- Date
- Mar 18, 2010, 05:10 UTC
- Message-ID
- <1268889045-21751-1-git-send-email-bebarino@gmail.com>
Getting the shortened branch name is as easy as using the shell's parameter expansion.
Signed-off-by: Stephen Boyd <bebarino@gmail.com> ---
Saw this while reading the code.
git-pull.sh | 2 +- 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
-- 1.7.0.2.276.g60daf