Skip to content

Commit

Permalink
notes: allow --dry-run for -n and --verbose for -v
Browse files Browse the repository at this point in the history
For consistency with other git commands, let the prune subcommand of
git notes accept the long options --dry-run and --verbose for the
respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Aug 9, 2010
1 parent cf958af commit e93487d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Documentation/git-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ OPTIONS
is taken to be in `refs/notes/` if it is not qualified.

-n::
--dry-run::
Do not remove anything; just report the object names whose notes
would be removed.

-v::
--verbose::
Report all object names whose notes are removed.


Expand Down
5 changes: 3 additions & 2 deletions builtin/notes.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,9 @@ static int prune(int argc, const char **argv, const char *prefix)
struct notes_tree *t;
int show_only = 0, verbose = 0;
struct option options[] = {
OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"),
OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"),
OPT_BOOLEAN('n', "dry-run", &show_only,
"do not remove, show only"),
OPT_BOOLEAN('v', "verbose", &verbose, "report pruned notes"),
OPT_END()
};

Expand Down

0 comments on commit e93487d

Please sign in to comment.