arturobernalg commented on a change in pull request #124: URL: https://github.com/apache/maven-scm/pull/124#discussion_r705587132
########## File path: maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java ########## @@ -121,36 +121,6 @@ public static void main( String[] args ) scmUrl = args[2]; ScmVersion scmVersion = null; - if ( args.length > 3 ) - { - String version = args[3]; - - if ( args.length > 4 ) - { - String type = args[4]; - - if ( "tag".equals( type ) ) - { - scmVersion = new ScmTag( version ); - } - else if ( "branch".equals( type ) ) - { - scmVersion = new ScmBranch( version ); - } - else if ( "revision".equals( type ) ) - { - scmVersion = new ScmRevision( version ); - } - else - { - throw new IllegalArgumentException( "'" + type + "' version type isn't known." ); - } - } - else - { - scmVersion = new ScmRevision( args[3] ); - } - } Review comment: HI @michael-o Because `args.length` can never > 3 otherwise will return error in line 105 ` if ( args.length != 3 )` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org