]> asedeno.scripts.mit.edu Git - git.git/blobdiff - notes.h
revert: use strbuf to refactor the code that writes the merge message
[git.git] / notes.h
diff --git a/notes.h b/notes.h
index f98578f91f7f26fbc8d1cf2aae01837143f8262f..bad03ccab776d837751803623394667bfd1c7d11 100644 (file)
--- a/notes.h
+++ b/notes.h
@@ -161,6 +161,18 @@ int for_each_note(struct notes_tree *t, int flags, each_note_fn fn,
  */
 int write_notes_tree(struct notes_tree *t, unsigned char *result);
 
+/*
+ * Remove all notes annotating non-existing objects from the given notes tree
+ *
+ * All notes in the given notes_tree that are associated with objects that no
+ * longer exist in the database, are removed from the notes tree.
+ *
+ * IMPORTANT: The changes made by prune_notes() to the given notes_tree
+ * structure are not persistent until a subsequent call to write_notes_tree()
+ * returns zero.
+ */
+void prune_notes(struct notes_tree *t);
+
 /*
  * Free (and de-initialize) the given notes_tree structure
  *