notes: fix malformed tree entry
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>
This commit is contained in:
parent
43a61b841d
commit
c88f0cc78e
2
notes.c
2
notes.c
@ -624,7 +624,7 @@ 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, "%06o %.*s%c", mode, path_len, path, '\0');
|
||||
strbuf_addf(buf, "%o %.*s%c", mode, path_len, path, '\0');
|
||||
strbuf_add(buf, sha1, 20);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user