Community
Participate
Working Groups
Sasa, if I wanted to create a NotesCommand that shows and adds notes to any id, how would I do that? Who should maintain the NoteMap? Is it meant to be repository wide or kind of a reuse and recycle type of object?
(In reply to comment #1) > Sasa, if I wanted to create a NotesCommand that shows and adds notes to any id, > how would I do that? Who should maintain the NoteMap? Is it meant to be > repository wide or kind of a reuse and recycle type of object? It is a reuse and recycle type of object. Here an usage example: Repository db = <instance of org.eclipse.jgit.lib.Repository> Ref notesBranch = db.getRef("refs/notes/commits"); if (notesBranch != null) { RevCommit commit = revWalk.parseCommit(notesBranch.getObjectId()); NoteMap map = NoteMap.read(revWalk.getObjectReader(), commit); // now you have an instance of NoteMap and can use it as usual, for example: map.getNote(<some commit ID>); }
For review... http://egit.eclipse.org/r/#change,2970
Merged as e109529d6f7f9c69e6fe7e864b90cdcafe998cf0.