Skip to content

Commit

Permalink
replace: allow long option names
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Sep 6, 2013
1 parent b8fcce1 commit ed0ff80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Documentation/git-replace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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
Expand Down
6 changes: 3 additions & 3 deletions builtin/replace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
};

Expand Down

0 comments on commit ed0ff80

Please sign in to comment.