Skip to content

Commit 0d12e59

Browse files
bebarinogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7d182f5 commit 0d12e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-pull.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
4141
log_arg= verbosity=
4242
merge_args=
4343
curr_branch=$(git symbolic-ref -q HEAD)
44-
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
44+
curr_branch_short="${curr_branch#refs/heads/}"
4545
rebase=$(git config --bool branch.$curr_branch_short.rebase)
4646
while :
4747
do

0 commit comments

Comments
 (0)