From: Christian Couder Date: Fri, 6 Sep 2013 05:10:58 +0000 (+0200) Subject: replace: allow long option names X-Git-Tag: v1.8.5-rc0~76^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed0ff80984d37f9f40b1bf209bc86ea2fa8f3783;p=thirdparty%2Fgit.git replace: allow long option names It is now standard practice in Git to have both short and long option names. So let's give a long option name to the git replace options too. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index a2bd2ee361..414000ef7d 100644 --- a/Documentation/git-replace.txt +++ b/Documentation/git-replace.txt @@ -54,13 +54,16 @@ achieve the same effect as the `--no-replace-objects` option. OPTIONS ------- -f:: +--force:: If an existing replace ref for the same object exists, it will be overwritten (instead of failing). -d:: +--delete:: Delete existing replace refs for the given objects. -l :: +--list :: List replace refs for objects that match the given pattern (or all if no pattern is given). Typing "git replace" without arguments, also lists all replace diff --git a/builtin/replace.c b/builtin/replace.c index 95736d98d2..d4d1b75ade 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -128,9 +128,9 @@ int cmd_replace(int argc, const char **argv, const char *prefix) { int list = 0, delete = 0, force = 0; struct option options[] = { - OPT_BOOLEAN('l', NULL, &list, N_("list replace refs")), - OPT_BOOLEAN('d', NULL, &delete, N_("delete replace refs")), - OPT_BOOLEAN('f', NULL, &force, N_("replace the ref if it exists")), + OPT_BOOLEAN('l', "list", &list, N_("list replace refs")), + OPT_BOOLEAN('d', "delete", &delete, N_("delete replace refs")), + OPT_BOOLEAN('f', "force", &force, N_("replace the ref if it exists")), OPT_END() };