Commit e769e0255ea46a96c6de8dfeb1f762ebbb4cebd9

John Wiegley 2011-02-07T00:11:17

Git does not like zero padded file attributes (git fsck)

1
2
3
4
5
6
7
8
9
10
11
12
13
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);