summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tree-walk.c2
-rw-r--r--tree-walk.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 79dba1d0f4..4dc86c7fe5 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -37,7 +37,7 @@ static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned
/* Initialize the descriptor entry */
desc->entry.path = path;
- desc->entry.mode = mode;
+ desc->entry.mode = canon_mode(mode);
desc->entry.sha1 = (const unsigned char *)(path + len);
}
diff --git a/tree-walk.h b/tree-walk.h
index ae04b6417d..ae7fb3a824 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -16,7 +16,7 @@ struct tree_desc {
static inline const unsigned char *tree_entry_extract(struct tree_desc *desc, const char **pathp, unsigned int *modep)
{
*pathp = desc->entry.path;
- *modep = canon_mode(desc->entry.mode);
+ *modep = desc->entry.mode;
return desc->entry.sha1;
}