Git does not like zero padded file attributes (git fsck)
diff --git a/src/tree.c b/src/tree.c
index bf1cdfa..5cef676 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -304,7 +304,7 @@ int git_tree__writeback(git_tree *tree, git_odb_source *src)
entry = git_vector_get(&tree->entries, i);
- sprintf(filemode, "%06o ", entry->attr);
+ sprintf(filemode, "%o ", entry->attr);
git__source_write(src, filemode, strlen(filemode));
git__source_write(src, entry->filename, strlen(entry->filename) + 1);