summaryrefslogtreecommitdiff
path: root/tar-tree.c
diff options
context:
space:
mode:
authorLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
committerLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
commit79a9d8ea0d88a3667ad19be8e705405ab5d896f1 (patch)
tree15d04fe258e969f2a43aaff3c292286984d0147c /tar-tree.c
parentBetter handling of exec extension in the git wrapper script (diff)
parentPost 0.99.8 master branch (diff)
downloadtgif-79a9d8ea0d88a3667ad19be8e705405ab5d896f1.tar.xz
Merge with master.kernel.org:/pub/scm/git/git.git
Diffstat (limited to 'tar-tree.c')
-rw-r--r--tar-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tar-tree.c b/tar-tree.c
index 2716ae3eb1..970c4bb54e 100644
--- 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;