Skip to content

Commit ed0ff80

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b8fcce1 commit ed0ff80

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Documentation/git-replace.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ achieve the same effect as the `--no-replace-objects` option.
5454
OPTIONS
5555
-------
5656
-f::
57+
--force::
5758
If an existing replace ref for the same object exists, it will
5859
be overwritten (instead of failing).
5960

6061
-d::
62+
--delete::
6163
Delete existing replace refs for the given objects.
6264

6365
-l <pattern>::
66+
--list <pattern>::
6467
List replace refs for objects that match the given pattern (or
6568
all if no pattern is given).
6669
Typing "git replace" without arguments, also lists all replace

builtin/replace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
128128
{
129129
int list = 0, delete = 0, force = 0;
130130
struct option options[] = {
131-
OPT_BOOLEAN('l', NULL, &list, N_("list replace refs")),
132-
OPT_BOOLEAN('d', NULL, &delete, N_("delete replace refs")),
133-
OPT_BOOLEAN('f', NULL, &force, N_("replace the ref if it exists")),
131+
OPT_BOOLEAN('l', "list", &list, N_("list replace refs")),
132+
OPT_BOOLEAN('d', "delete", &delete, N_("delete replace refs")),
133+
OPT_BOOLEAN('f', "force", &force, N_("replace the ref if it exists")),
134134
OPT_END()
135135
};
136136

0 commit comments

Comments
 (0)