replace: allow long option names
authorChristian Couder <chriscool@tuxfamily.org>
Fri, 6 Sep 2013 05:10:58 +0000 (07:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Sep 2013 20:32:24 +0000 (13:32 -0700)
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 <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-replace.txt
builtin/replace.c
index a2bd2ee361c33c2f247d737789cfec12a28480c4..414000ef7d74e96dae5db7c86fd6bffc63b353cd 100644 (file)
@@ -54,13 +54,16 @@ achieve the same effect as the `--no-replace-objects` option.
 OPTIONS
 -------
 -f::
 OPTIONS
 -------
 -f::
+--force::
        If an existing replace ref for the same object exists, it will
        be overwritten (instead of failing).
 
 -d::
        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 <pattern>::
        Delete existing replace refs for the given objects.
 
 -l <pattern>::
+--list <pattern>::
        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
        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
index 95736d98d24d4a4b4761bc92609e93781e0da2d5..d4d1b75aded73dd0224096dbd2a82012e01ac8d6 100644 (file)
@@ -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[] = {
 {
        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()
        };
 
                OPT_END()
        };