summaryrefslogtreecommitdiff
path: root/src/notes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notes.c')
-rw-r--r--src/notes.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/notes.c b/src/notes.c
index 6f9e7779d..81e4e5073 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -33,7 +33,7 @@ static int find_subtree_in_current_level(
if (!git__ishex(git_tree_entry_name(entry)))
continue;
- if (S_ISDIR(git_tree_entry_attributes(entry))
+ if (S_ISDIR(git_tree_entry_filemode(entry))
&& strlen(git_tree_entry_name(entry)) == 2
&& !strncmp(git_tree_entry_name(entry), annotated_object_sha + fanout, 2))
return git_tree_lookup(out, repo, git_tree_entry_id(entry));
@@ -180,7 +180,7 @@ static int manipulate_note_in_tree_r(
subtree_name[2] = '\0';
error = tree_write(out, repo, parent, git_tree_id(new),
- subtree_name, 0040000);
+ subtree_name, GIT_FILEMODE_TREE);
cleanup:
@@ -252,7 +252,13 @@ static int insert_note_in_tree_enotfound_cb(git_tree **out,
GIT_UNUSED(current_error);
/* No existing fanout at this level, insert in place */
- return tree_write(out, repo, parent, note_oid, annotated_object_sha + fanout, 0100644);
+ return tree_write(
+ out,
+ repo,
+ parent,
+ note_oid,
+ annotated_object_sha + fanout,
+ GIT_FILEMODE_BLOB);
}
static int note_write(git_oid *out,