notes¶

For git-notes(1).

Overview¶

Manage git notes using GitNotesManager (collection-level) and GitNoteCmd (per-note operations).

Example¶

from libvcs.cmd.git import Git

git = Git(path='/path/to/repo')

# Add a note to a commit
git.notes.add(object='HEAD', message='This is a note')

# List all notes
notes = git.notes.ls()

# Get a specific note and operate on it
note = git.notes.get(object='HEAD')
note.show()
note.append(message='Additional info')
note.remove()

# Prune notes for non-existent objects
git.notes.prune()

API Reference¶

class libvcs.cmd.git.GitNotesManager
¶

Bases: object

Traverse and manage git notes with ORM-like filtering via QueryList.

class libvcs.cmd.git.GitNoteCmd
¶

Bases: object

Run git commands targeting a specific note.