pub fn remove_notes(
repo: &Repository,
commit_oids: &HashSet<ObjectId>,
) -> GitResult<()>Expand description
Retract the notes attached to commit_oids from refs/notes/heddle.
The notes ref copies to the public mirror alongside branches and tags
(collect_ref_updates picks up refs/notes/*), so a note left behind for a
commit that has since been embargoed/retracted is a metadata leak: the
mirror keeps publishing a note whose payload (and tree entry) references the
withheld commit. This is the notes-ref sibling of the branch/tag retraction
the exporter already performs (heddle#316).
Writes a single new notes commit dropping every present entry, then advances
refs/notes/heddle to it. A genuine fast-forward (the new commit descends
from the prior notes head), so it survives the bridge’s FF guard on push.
No-op — no new commit, no ref churn — when the notes ref is absent or none
of commit_oids actually has an entry.