From: Nicolas Vigier Date: Sat, 1 Feb 2014 02:18:02 +0000 (+0000) Subject: rebase: remove useless arguments check X-Git-Tag: v2.0.0-rc0~150^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2f9dc1fb529662e157c53c7d91e5f75e0f72c6ea?ds=inline;hp=-c rebase: remove useless arguments check Remove a check on the number of arguments for --onto and -x options. It is not possible for $# to be <= 2 at this point : - if --onto or -x has an argument, git rev-parse --parseopt will provide something like this : set -- --onto 'x' -- when parsing the "--onto" option, $# will be 3 or more if there are other options. - if --onto or -x doesn't have an argument, git rev-parse --parseopt will exit with an error and display usage information. Signed-off-by: Nicolas Vigier Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- 2f9dc1fb529662e157c53c7d91e5f75e0f72c6ea diff --git a/git-rebase.sh b/git-rebase.sh index c1f98ae5ad..d1835ba58a 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -238,12 +238,10 @@ do action=${1##--} ;; --onto) - test 2 -le "$#" || usage onto="$2" shift ;; -x) - test 2 -le "$#" || usage cmd="${cmd}exec $2${LF}" shift ;;