Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
test: t4102-apply-rename fails with strict umask.
[gitweb.git]
/
tar-tree.c
diff --git
a/tar-tree.c
b/tar-tree.c
index 2716ae3eb1430abfc43d980d904fc192f8dcbbf4..970c4bb54e148282a89f1249a96deca880bccafd 100644
(file)
--- a/
tar-tree.c
+++ b/
tar-tree.c
@@
-353,6
+353,8
@@
static void traverse_tree(void *buffer, unsigned long size,
if (size < namelen + 20 || sscanf(buffer, "%o", &mode) != 1)
die("corrupt 'tree' file");
+ if (S_ISDIR(mode) || S_ISREG(mode))
+ mode |= (mode & 0100) ? 0777 : 0666;
buffer = sha1 + 20;
size -= namelen + 20;