jelmer/python-fastimport — pull request #1 by masklinn (2014-03-10 15:09:15+00:00)
Title: Add generation support for notemodify

[notemodify](https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html#_tt_notemodify_tt) allows attaching (namespaced) [notes](http://git-scm.com/blog/2010/08/25/notes.html) to commits. Notes don't alter the commit itself, useful to add programmatic or separate metadata.

* no parsing support
* inherits from FileCommand because `notemodify` is a `commit` sub-commant. That maps directly to the original, but it makes usage sort-of weird: to add a note to a commit `parent` one has to create a new commit along the lines of:

commands.CommitCommand(
ref='refs/notes/%(namespace)s' % (namespace or 'commits'),
mark=None,
author=parent.author,
committer=parent.committer,
message=pointless_message,
from_=None,
merges=[],
more_authors=[],
file_iter=[
commands.NoteModifyCommand(parent.mark, note_content)
]
)

that makes the API fairly terrible on its own, but logical if somebody understands the fast-export format. Since there's not much documentation, that probably makes more sense than a higher-level API divorced from the raw fast-import format.