projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a61b8
)
notes: fix malformed tree entry
author
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Feb 2010 05:39:06 +0000
(21:39 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Feb 2010 05:39:06 +0000
(21:39 -0800)
The mode bits for entries in a tree object should be an octal number
with minimum number of digits. Do not pad it with 0 to the left.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
notes.c
patch
|
blob
|
history
diff --git
a/notes.c
b/notes.c
index 3ba3e6de17a562f309e6d8c64d609768fd740110..a4f9926d4dfc8e8d4ba051714446517b9074fc05 100644
(file)
--- a/
notes.c
+++ b/
notes.c
@@
-624,8
+624,8
@@
static void write_tree_entry(struct strbuf *buf, unsigned int mode,
const char *path, unsigned int path_len, const
unsigned char *sha1)
{
-
strbuf_addf(buf, "%06
o %.*s%c", mode, path_len, path, '\0');
-
strbuf_add(buf, sha1, 20);
+
strbuf_addf(buf, "%
o %.*s%c", mode, path_len, path, '\0');
+ strbuf_add(buf, sha1, 20);
}
static void tree_write_stack_init_subtree(struct tree_write_stack *tws,