From: Junio C Hamano Date: Thu, 19 May 2011 06:50:52 GMT Subject: Re: [PATCH 1/3] notes remove: allow removing more than one Message-ID: <7v1uzv9oab.fsf@alter.siamese.dyndns.org> In-Reply-To: <4DD4BC0D.2000805@drmicha.warpmail.net> Michael J Gruber writes: [jc: cull the part you did not comment on, thanks] >> +test_expect_success 'removing more than one' ' >> + before=$(git rev-parse --verify refs/notes/commits) && >> + test_when_finished "git update-ref refs/notes/commits $before" && >> + git notes remove HEAD^^ HEAD^^^ && >> + git diff --name-only refs/notes/commits^ refs/notes/commits >actual && >> + test 2 = $(wc -l > + git ls-tree -r --name-only refs/notes/commits >actual && >> + >empty && >> + test_cmp empty actual >> +' > > You're not really testing that this removes the correct notes. Actually, > you're not even testing that this removes only 2 notes when there are > more than 2, are you? In the test vector, there are only two notes, and I am testing removal of multiple. What do you want me to do? Test removing one and make sure the other one survives ;-)? Patches on top of it is very welcome, but I wouldn't bother.