Package org.eclipse.jgit.api
Class AddNoteCommand
Add object notes.
- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AddNoteCommand
(Repository repo) Constructor for AddNoteCommand -
Method Summary
Modifier and TypeMethodDescriptioncall()
(package private) static void
commitNoteMap
(Repository r, String ref, RevWalk walk, NoteMap map, RevCommit notesCommit, ObjectInserter inserter, String msg) setMessage
(String message) Set the notes messagesetNotesRef
(String notesRef) Set name of aRef
to read notes fromsetObjectId
(RevObject id) Sets the object id of object you want a note on.Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
Field Details
-
id
-
message
-
notesRef
-
-
Constructor Details
-
AddNoteCommand
Constructor for AddNoteCommand- Parameters:
repo
- theRepository
-
-
Method Details
-
call
Execute the command
- Specified by:
call
in interfaceCallable<Note>
- Specified by:
call
in classGitCommand<Note>
- Throws:
GitAPIException
-
setObjectId
Sets the object id of object you want a note on. If the object already has a note, the existing note will be replaced.- Parameters:
id
- aRevObject
- Returns:
this
-
setMessage
Set the notes message- Parameters:
message
- the notes message used when adding a note- Returns:
this
-
commitNoteMap
static void commitNoteMap(Repository r, String ref, RevWalk walk, NoteMap map, RevCommit notesCommit, ObjectInserter inserter, String msg) throws IOException - Throws:
IOException
-
setNotesRef
Set name of aRef
to read notes from- Parameters:
notesRef
- the ref to read notes from. Note, the default value ofConstants.R_NOTES_COMMITS
will be used if nothing is set- Returns:
this
- See Also:
-