Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-25 08:39:06 +0300
committerJunio C Hamano <gitster@pobox.com>2010-02-25 08:39:06 +0300
commitc88f0cc78e2bd387c9a2a47973a3c0a3b6328fec (patch)
tree3ccf0321f881efac45a0b296d3e891d6f8bb7636 /notes.c
parent43a61b841d261fe51ac64b55d654677b0cd93ad9 (diff)
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>
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/notes.c b/notes.c
index 3ba3e6de17..a4f9926d4d 100644
--- 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, "%06o %.*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,