From: Felipe Contreras Date: Thu, 29 Aug 2013 18:14:34 GMT Subject: [PATCH 3/9] rm: add --staged option Message-ID: <1377800080-5309-4-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1377800080-5309-1-git-send-email-felipe.contreras@gmail.com> Synonym for --cached. Signed-off-by: Felipe Contreras --- Documentation/git-rm.txt | 5 ++++- builtin/rm.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt index 1d876c2..156b40d 100644 --- a/Documentation/git-rm.txt +++ b/Documentation/git-rm.txt @@ -8,7 +8,7 @@ git-rm - Remove files from the working tree and from the index SYNOPSIS -------- [verse] -'git rm' [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] ... +'git rm' [-f | --force] [-n] [-r] [--cached | --staged] [--ignore-unmatch] [--quiet] [--] ... DESCRIPTION ----------- @@ -60,6 +60,9 @@ OPTIONS Working tree files, whether modified or not, will be left alone. +--staged:: + Synonym for --cached. + --ignore-unmatch:: Exit with a zero status even if no files matched. diff --git a/builtin/rm.c b/builtin/rm.c index 0df0b4d..919911f 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -268,6 +268,7 @@ static struct option builtin_rm_options[] = { OPT__DRY_RUN(&show_only, N_("dry run")), OPT__QUIET(&quiet, N_("do not list removed files")), OPT_BOOLEAN( 0 , "cached", &index_only, N_("only remove from the index")), + OPT_BOOLEAN( 0 , "staged", &index_only, N_("only remove from the index")), OPT__FORCE(&force, N_("override the up-to-date check")), OPT_BOOLEAN('r', NULL, &recursive, N_("allow recursive removal")), OPT_BOOLEAN( 0 , "ignore-unmatch", &ignore_unmatch, -- 1.8.4-fc