Hi Christian
I agree with you that the AddCommand functionality could be deemed as "work as designed" with regards to the "git notes add" (Although native git notes add fails if there's a note already exists, unless -f is used - But that's a different discussion).
What I'm after is a similar command for "git notes append", which doesn't exist as of now AFAIK. Inspecting the code a bit more I realise
https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java#L147 is implemented particularly for "git notes add ..". I was able to get "git notes append ..." working on a local branch by changing LeafBucket.set(
AnyObjectId noteOn, AnyObjectId noteData, ObjectReader or) method (to support add and append). However there are tests that fail due to the current expectation that LeafBucket.set() only supports "git notes add".
I assumed there could be a LeafBucket.append() method which can support "git notes append ..", which is exposed by a new AppendNoteCommand. Does that make sense?
Cheers
-- Imran