rename 'got rm' to 'got remove'; keep 'rm' as an alias
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
diff --git a/got/got.1 b/got/got.1
index 73e5c0f..78be0b2 100644
--- a/got/got.1
+++ b/got/got.1
@@ -371,7 +371,7 @@ Short alias for
.It Cm add Ar file-path ...
Schedule unversioned files in a work tree for addition to the
repository in the next commit.
-.It Cm rm Ar file-path ...
+.It Cm remove Ar file-path ...
Remove versioned files from a work tree and schedule them for deletion
from the repository in the next commit.
.Pp
@@ -382,6 +382,9 @@ are as follows:
.It Fl f
Perform the operation even if a file contains uncommitted modifications.
.El
+.It Cm rm
+Short alias for
+.Cm remove .
.It Cm revert Ar file-path ...
Revert any uncommited changes in files at the specified paths.
File contents will be overwritten with those contained in the
diff --git a/got/got.c b/got/got.c
index 7f1a01f..85ea725 100644
--- a/got/got.c
+++ b/got/got.c
@@ -85,7 +85,7 @@ __dead static void usage_status(void);
__dead static void usage_ref(void);
__dead static void usage_branch(void);
__dead static void usage_add(void);
-__dead static void usage_rm(void);
+__dead static void usage_remove(void);
__dead static void usage_revert(void);
__dead static void usage_commit(void);
__dead static void usage_cherrypick(void);
@@ -102,7 +102,7 @@ static const struct got_error* cmd_status(int, char *[]);
static const struct got_error* cmd_ref(int, char *[]);
static const struct got_error* cmd_branch(int, char *[]);
static const struct got_error* cmd_add(int, char *[]);
-static const struct got_error* cmd_rm(int, char *[]);
+static const struct got_error* cmd_remove(int, char *[]);
static const struct got_error* cmd_revert(int, char *[]);
static const struct got_error* cmd_commit(int, char *[]);
static const struct got_error* cmd_cherrypick(int, char *[]);
@@ -120,7 +120,7 @@ static struct got_cmd got_commands[] = {
{ "ref", cmd_ref, usage_ref, "" },
{ "branch", cmd_branch, usage_branch, "br" },
{ "add", cmd_add, usage_add, "" },
- { "rm", cmd_rm, usage_rm, "" },
+ { "remove", cmd_remove, usage_remove, "rm" },
{ "revert", cmd_revert, usage_revert, "rv" },
{ "commit", cmd_commit, usage_commit, "ci" },
{ "cherrypick", cmd_cherrypick, usage_cherrypick, "ch" },
@@ -2506,14 +2506,14 @@ done:
}
__dead static void
-usage_rm(void)
+usage_remove(void)
{
- fprintf(stderr, "usage: %s rm [-f] file-path ...\n", getprogname());
+ fprintf(stderr, "usage: %s remove [-f] file-path ...\n", getprogname());
exit(1);
}
static const struct got_error *
-cmd_rm(int argc, char *argv[])
+cmd_remove(int argc, char *argv[])
{
const struct got_error *error = NULL;
struct got_worktree *worktree = NULL;
@@ -2540,7 +2540,7 @@ cmd_rm(int argc, char *argv[])
argv += optind;
if (argc < 1)
- usage_rm();
+ usage_remove();
/* make sure each file exists before doing anything halfway */
for (i = 0; i < argc; i++) {