Commit Diff


commit - ce5b7c56feb64f28afedf39561cac1a17a3f028c
commit + 648e4ef7f69d8e5852f9d53021c8863df78fed33
blob - 73e5c0ffe45e0fc90db1a713e9c8f9075ab559cb
blob + 78be0b25778ab9aadac8e514150e357eb2bb13ee
--- got/got.1
+++ 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
blob - 7f1a01f67aaf5f0a4cab88b726643ca644226353
blob + 85ea7257fdc18a8c40ef5ed062fc16e6509d06d5
--- got/got.c
+++ 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++) {