author | Rene Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Fri, 6 Oct 2006 23:47:35 +0000 (01:47 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 8 Oct 2006 06:16:54 +0000 (23:16 -0700) | ||
commit | 62cdce17c57a28240048c5064fab57edae19657f | |
tree | 6cfdc218c3fdbccbb88e1f5ce31531aaa465071e | tree | snapshot |
parent | cf72fb07b77c73b4777b6a2e0836e3029c5f0f3c | commit | diff |
git-archive --format=zip: add symlink support
Add symlink support to ZIP file creation, and a few tests.
This implementation sets the "version made by" field
(creator_version) to Unix for symlinks, only; regular files and
directories are still marked as originating from FAT/VFAT/NTFS.
Also set "external file attributes" (attr2) to 0 for regular
files and 16 for directories (FAT attribute), and to the file
mode for symlinks.
We could always set the creator_version to Unix and include the
mode, but then Info-ZIP unzip would set the mode of the extracted
files to *exactly* the value stored in attr2. The FAT trick
makes it apply the umask instead. Note: FAT has no executable
bit, so this information is not stored in the ZIP file.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add symlink support to ZIP file creation, and a few tests.
This implementation sets the "version made by" field
(creator_version) to Unix for symlinks, only; regular files and
directories are still marked as originating from FAT/VFAT/NTFS.
Also set "external file attributes" (attr2) to 0 for regular
files and 16 for directories (FAT attribute), and to the file
mode for symlinks.
We could always set the creator_version to Unix and include the
mode, but then Info-ZIP unzip would set the mode of the extracted
files to *exactly* the value stored in attr2. The FAT trick
makes it apply the umask instead. Note: FAT has no executable
bit, so this information is not stored in the ZIP file.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
archive-zip.c | diff | blob | history | |
t/t5000-tar-tree.sh | diff | blob | history |