diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-18 17:42:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-18 17:42:15 -0700 |
commit | 39bd2eb56af89d43a08ba54699d9a1849ab57b39 (patch) | |
tree | 7551a984921081bf2532f68303febe7275107ed1 /archive-zip.c | |
parent | 68d3025a805097ec148ec6e9b0b54a5db1ef138e (diff) | |
parent | 89df580d0a2e97b0c7c072d87e5e815534deed56 (diff) | |
download | git-39bd2eb56af89d43a08ba54699d9a1849ab57b39.tar.gz git-39bd2eb56af89d43a08ba54699d9a1849ab57b39.tar.xz |
Merge branch 'master' into ph/strbuf
* master: (94 commits)
Fixed update-hook example allow-users format.
Documentation/git-svn: updated design philosophy notes
t/t4014: test "am -3" with mode-only change.
git-commit.sh: Shell script cleanup
preserve executable bits in zip archives
Fix lapsus in builtin-apply.c
git-push: documentation and tests for pushing only branches
git-svnimport: Use separate arguments in the pipe for git-rev-parse
contrib/fast-import: add perl version of simple example
contrib/fast-import: add simple shell example
rev-list --bisect: Bisection "distance" clean up.
rev-list --bisect: Move some bisection code into best_bisection.
rev-list --bisect: Move finding bisection into do_find_bisection.
Document ls-files --with-tree=<tree-ish>
git-commit: partial commit of paths only removed from the index
git-commit: Allow partial commit of file removal.
send-email: make message-id generation a bit more robust
git-apply: fix whitespace stripping
git-gui: Disable native platform text selection in "lists"
apply --index-info: fall back to current index for mode changes
...
Diffstat (limited to 'archive-zip.c')
-rw-r--r-- | archive-zip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archive-zip.c b/archive-zip.c index f63dff383..74e30f620 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -192,7 +192,8 @@ static int write_zip_entry(const unsigned char *sha1, compressed_size = 0; } else if (S_ISREG(mode) || S_ISLNK(mode)) { method = 0; - attr2 = S_ISLNK(mode) ? ((mode | 0777) << 16) : 0; + attr2 = S_ISLNK(mode) ? ((mode | 0777) << 16) : + (mode & 0111) ? ((mode) << 16) : 0; if (S_ISREG(mode) && zlib_compression_level != 0) method = 8; result = 0; @@ -231,7 +232,8 @@ static int write_zip_entry(const unsigned char *sha1, } copy_le32(dirent.magic, 0x02014b50); - copy_le16(dirent.creator_version, S_ISLNK(mode) ? 0x0317 : 0); + copy_le16(dirent.creator_version, + S_ISLNK(mode) || (S_ISREG(mode) && (mode & 0111)) ? 0x0317 : 0); copy_le16(dirent.version, 10); copy_le16(dirent.flags, 0); copy_le16(dirent.compression_method, method); |