summaryrefslogtreecommitdiff
path: root/notes.h
diff options
context:
space:
mode:
Diffstat (limited to 'notes.h')
-rw-r--r--notes.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/notes.h b/notes.h
index f98578f91f..bad03ccab7 100644
--- a/notes.h
+++ b/notes.h
@@ -162,6 +162,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
*
* IMPORTANT: Changes made to the given notes_tree since the last, successful