mirror of
https://github.com/git/git.git
synced 2025-03-27 19:58:44 +00:00
Merge branch 'maint'
* maint: tar-tree: file/dirmode fix.
This commit is contained in:
commit
be972922d0
10
tar-tree.c
10
tar-tree.c
@ -304,9 +304,11 @@ static void write_header(const unsigned char *sha1, char typeflag, const char *b
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (S_ISDIR(mode))
|
if (S_ISDIR(mode))
|
||||||
mode |= 0755; /* GIT doesn't store permissions of dirs */
|
mode |= 0777;
|
||||||
if (S_ISLNK(mode))
|
else if (S_ISREG(mode))
|
||||||
mode |= 0777; /* ... nor of symlinks */
|
mode |= (mode & 0100) ? 0777 : 0666;
|
||||||
|
else if (S_ISLNK(mode))
|
||||||
|
mode |= 0777;
|
||||||
sprintf(&header[100], "%07o", mode & 07777);
|
sprintf(&header[100], "%07o", mode & 07777);
|
||||||
|
|
||||||
/* XXX: should we provide more meaningful info here? */
|
/* XXX: should we provide more meaningful info here? */
|
||||||
@ -391,7 +393,7 @@ int main(int argc, char **argv)
|
|||||||
usage(tar_tree_usage);
|
usage(tar_tree_usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
commit = lookup_commit_reference(sha1);
|
commit = lookup_commit_reference_gently(sha1, 1);
|
||||||
if (commit) {
|
if (commit) {
|
||||||
write_global_extended_header(commit->object.sha1);
|
write_global_extended_header(commit->object.sha1);
|
||||||
archive_time = commit->date;
|
archive_time = commit->date;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user