Browse Source

notes: allow --dry-run for -n and --verbose for -v

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>
maint
René Scharfe 15 years ago committed by Junio C Hamano
parent
commit
e93487d2f0
  1. 2
      Documentation/git-notes.txt
  2. 5
      builtin/notes.c

2
Documentation/git-notes.txt

@ -129,10 +129,12 @@ OPTIONS
is taken to be in `refs/notes/` if it is not qualified. is taken to be in `refs/notes/` if it is not qualified.


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


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





5
builtin/notes.c

@ -798,8 +798,9 @@ static int prune(int argc, const char **argv, const char *prefix)
struct notes_tree *t; struct notes_tree *t;
int show_only = 0, verbose = 0; int show_only = 0, verbose = 0;
struct option options[] = { struct option options[] = {
OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"), OPT_BOOLEAN('n', "dry-run", &show_only,
OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"), "do not remove, show only"),
OPT_BOOLEAN('v', "verbose", &verbose, "report pruned notes"),
OPT_END() OPT_END()
}; };



Loading…
Cancel
Save