notes remove: allow removing more than one
While "xargs -n1 git notes rm" is certainly a possible way to remove notes from many objects, this would create one notes "commit" per removal, which is not quite suitable for seasonal housekeeping. Allow taking more than one on the command line, and record their removal as a single atomic event if everthing goes well. Even though the old code insisted that "git notes rm" must be given only one object (or zero, in which case it would default to HEAD), this condition was not tested. Add tests to handle the new case where we feed multiple objects, and also make sure if there is a bad input, no change is recorded. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -17,7 +17,7 @@ SYNOPSIS
|
||||
'git notes' merge [-v | -q] [-s <strategy> ] <notes_ref>
|
||||
'git notes' merge --commit [-v | -q]
|
||||
'git notes' merge --abort [-v | -q]
|
||||
'git notes' remove [<object>]
|
||||
'git notes' remove [<object>...]
|
||||
'git notes' prune [-n | -v]
|
||||
'git notes' get-ref
|
||||
|
||||
@ -106,8 +106,9 @@ When done, the user can either finalize the merge with
|
||||
'git notes merge --abort'.
|
||||
|
||||
remove::
|
||||
Remove the notes for a given object (defaults to HEAD).
|
||||
This is equivalent to specifying an empty note message to
|
||||
Remove the notes for given objects (defaults to HEAD). When
|
||||
giving zero or one object from the command line, this is
|
||||
equivalent to specifying an empty note message to
|
||||
the `edit` subcommand.
|
||||
|
||||
prune::
|
||||
|
Reference in New Issue
Block a user