summaryrefslogtreecommitdiff
path: root/notes-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'notes-cache.c')
-rw-r--r--notes-cache.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/notes-cache.c b/notes-cache.c
index eabe4a0..c4e9bb7 100644
--- a/notes-cache.c
+++ b/notes-cache.c
@@ -48,7 +48,6 @@ int notes_cache_write(struct notes_cache *c)
{
unsigned char tree_sha1[20];
unsigned char commit_sha1[20];
- struct strbuf msg = STRBUF_INIT;
if (!c || !c->tree.initialized || !c->tree.ref || !*c->tree.ref)
return -1;
@@ -57,12 +56,11 @@ int notes_cache_write(struct notes_cache *c)
if (write_notes_tree(&c->tree, tree_sha1))
return -1;
- strbuf_attach(&msg, c->validity,
- strlen(c->validity), strlen(c->validity) + 1);
- if (commit_tree(&msg, tree_sha1, NULL, commit_sha1, NULL, NULL) < 0)
+ if (commit_tree(c->validity, strlen(c->validity), tree_sha1, NULL,
+ commit_sha1, NULL, NULL) < 0)
return -1;
if (update_ref("update notes cache", c->tree.ref, commit_sha1, NULL,
- 0, QUIET_ON_ERR) < 0)
+ 0, UPDATE_REFS_QUIET_ON_ERR) < 0)
return -1;
return 0;