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 <boklm@mars-attacks.org> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nicolas Vigier committed Feb 1, 2014 at 02:18 UTC 2f9dc1fb529662e157c53c7d91e5f75e0f72c6ea
1 file changed -2
git-rebase.sh
-2
@@ -238,12 +238,10 @@ do
238 action=${1##--}
239 ;;
240 --onto)
241 - test 2 -le "$#" || usage
241 onto="$2"
242 shift
243 ;;
244 -x)
246 - test 2 -le "$#" || usage
245 cmd="${cmd}exec $2${LF}"
246 shift
247 ;;