summaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/notes.c b/notes.c
index b7d79e1900..a5d888d772 100644
--- a/notes.c
+++ b/notes.c
@@ -105,6 +105,13 @@ static unsigned char *lookup_notes(const unsigned char *commit_sha1)
return hash_map.entries[index].notes_sha1;
}
+void free_notes(void)
+{
+ free(hash_map.entries);
+ memset(&hash_map, 0, sizeof(struct hash_map));
+ initialized = 0;
+}
+
void get_commit_notes(const struct commit *commit, struct strbuf *sb,
const char *output_encoding, int flags)
{