@@ -51,7 +51,9 @@ static struct option builtin_clone_options[] = {
5151 OPT_BOOLEAN ('n' , "no-checkout" , & option_no_checkout ,
5252 "don't create a checkout" ),
5353 OPT_BOOLEAN (0 , "bare" , & option_bare , "create a bare repository" ),
54- OPT_BOOLEAN (0 , "naked" , & option_bare , "create a bare repository" ),
54+ { OPTION_BOOLEAN , 0 , "naked" , & option_bare , NULL ,
55+ "create a bare repository" ,
56+ PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
5557 OPT_BOOLEAN (0 , "mirror" , & option_mirror ,
5658 "create a mirror repository (implies bare)" ),
5759 OPT_BOOLEAN ('l' , "local" , & option_local ,
@@ -61,7 +63,7 @@ static struct option builtin_clone_options[] = {
6163 OPT_BOOLEAN ('s' , "shared" , & option_shared ,
6264 "setup as shared repository" ),
6365 OPT_BOOLEAN (0 , "recursive" , & option_recursive ,
64- "setup as shared repository " ),
66+ "initialize submodules in the clone " ),
6567 OPT_STRING (0 , "template" , & option_template , "path" ,
6668 "path the template repository" ),
6769 OPT_STRING (0 , "reference" , & option_reference , "repo" ,
@@ -377,8 +379,13 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
377379 argc = parse_options (argc , argv , prefix , builtin_clone_options ,
378380 builtin_clone_usage , 0 );
379381
382+ if (argc > 2 )
383+ usage_msg_opt ("Too many arguments." ,
384+ builtin_clone_usage , builtin_clone_options );
385+
380386 if (argc == 0 )
381- die ("You must specify a repository to clone." );
387+ usage_msg_opt ("You must specify a repository to clone." ,
388+ builtin_clone_usage , builtin_clone_options );
382389
383390 if (option_mirror )
384391 option_bare = 1 ;
0 commit comments