author | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 May 2011 22:44:37 +0000 (15:44 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 19 May 2011 17:44:44 +0000 (10:44 -0700) | ||
commit | c3ab1a8e4cb8a84967efcf45c5e6bee41b17f9f9 | |
tree | 207ae18917753171c9e1125cf19446319ae8ecd8 | tree | snapshot |
parent | b602ed7dea968d72c5b3f61ca016de7f285d80ef | commit | diff |
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>
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>
Documentation/git-notes.txt | diff | blob | history | |
builtin/notes.c | diff | blob | history | |
t/t3301-notes.sh | diff | blob | history |