Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--format zip archive stores zip file itself #40

Open
KSR-Yasuda opened this issue Mar 29, 2023 · 1 comment
Open

--format zip archive stores zip file itself #40

KSR-Yasuda opened this issue Mar 29, 2023 · 1 comment

Comments

@KSR-Yasuda
Copy link

For --format zip, it tries to append submodule files by zip -g command,
as tar --concatenate for --format tar.

However, it just adds the submodule's zip archive file.

Perhaps it is because environment zip command does not have -g option.

Procedure

% git -c protocol.file.allow=always submodule add ../b.git b
% git commit -m "b"
% git archive-all --format zip ../01.zip
  adding: b.zip (stored 0%)

% 7z l ../01.zip

7-Zip 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15

Scanning the drive for archives:
1 file, 793 bytes (1 KiB)

Listing archive: ..\01.zip

--
Path = ..\01.zip
Type = zip
Physical Size = 793
Comment = 506c134f55e7ebc19cb5cf8ac3c15d4ba9a0a458

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2023-03-29 09:12:51 .....           42           42  .gitmodules
2023-03-29 09:12:51 D....            0            0  b
2023-03-29 11:36:59 ....A          260          260  b.zip                      # <-- Just a zip archive is added
------------------- ----- ------------ ------------  ------------------------
2023-03-29 11:36:59                302          302  2 files, 1 folders
% zip --help
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -!   use privileges (if granted) to obtain all aspects of WinNT security
  -$   include volume label         -S   include system and hidden files
  -e   encrypt                      -n   don't compress these suffixes
  -h2  show more help
  

If zip -g doesn't work as expected,
you should create a tar archive, and then, recompress into a zip file.

@KSR-Yasuda
Copy link
Author

KSR-Yasuda commented Mar 29, 2023

Oh, #38 has already fixed it.
Could you merge the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant