pathspec: add copy_pathspec
[gitweb.git] / builtin / remote.c
index 8a670d82a74017d0f7b27a5b5b5232abf32d2816..5e54d367b82cd91dbba70e2570dc620a3a13cd21 100644 (file)
@@ -11,7 +11,7 @@ static const char * const builtin_remote_usage[] = {
        N_("git remote [-v | --verbose]"),
        N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>"),
        N_("git remote rename <old> <new>"),
-       N_("git remote rm <name>"),
+       N_("git remote remove <name>"),
        N_("git remote set-head <name> (-a | -d | <branch>)"),
        N_("git remote [-v | --verbose] show [-n] <name>"),
        N_("git remote prune [-n | --dry-run] <name>"),
@@ -34,12 +34,12 @@ static const char * const builtin_remote_rename_usage[] = {
 };
 
 static const char * const builtin_remote_rm_usage[] = {
-       N_("git remote rm <name>"),
+       N_("git remote remove <name>"),
        NULL
 };
 
 static const char * const builtin_remote_sethead_usage[] = {
-       N_("git remote set-head <name> (-a | -d | <branch>])"),
+       N_("git remote set-head <name> (-a | -d | <branch>)"),
        NULL
 };
 
@@ -178,7 +178,7 @@ static int add(int argc, const char **argv)
        argc = parse_options(argc, argv, NULL, options, builtin_remote_add_usage,
                             0);
 
-       if (argc < 2)
+       if (argc != 2)
                usage_with_options(builtin_remote_add_usage, options);
 
        if (mirror && master)
@@ -1580,7 +1580,7 @@ int cmd_remote(int argc, const char **argv, const char *prefix)
                result = add(argc, argv);
        else if (!strcmp(argv[0], "rename"))
                result = mv(argc, argv);
-       else if (!strcmp(argv[0], "rm"))
+       else if (!strcmp(argv[0], "rm") || !strcmp(argv[0], "remove"))
                result = rm(argc, argv);
        else if (!strcmp(argv[0], "set-head"))
                result = set_head(argc, argv);