git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "git archive" seems to be broken wrt zip files

From
Jeff King <peff@peff.net>
Date
Sep 11, 2011, 06:27 UTC
Message-ID
<20110911062740.GA8018@sigill.intra.peff.net>
In-Reply-To
<20110911062206.GA29620@sigill.intra.peff.net>
On Sun, Sep 11, 2011 at 02:22:06AM -0400, Jeff King wrote:
Show 8 quoted lines
> Hmm. I can easily replicate the problem here, but interestingly it does
> not happen with sub-trees like:
> 
>   git archive --format=zip HEAD:drivers -o ../kernel.zip
> 
> Going back in history, I can replicate it with René's 62cdce1
> (git-archive --format=zip: add symlink support, 2006-10-07). So there's
> nothing to bisect.
Weirder still. I get roughly the same output as you:
  finishing deferred symbolic links:
    arch/microblaze/boot/dts/system.dts -> ../../platform/generic/system.dts
    drivers/scsi/aic94xx/aic94xx_reg.h -> /*^J * Aic94xx SAS/SATA driver...
But looking at the generated file with zipinfo, I see:
  $ zipinfo kernel.zip
  ...
  lrwxrwxrwx  2.3 unx       33 b- stor 11-Aug-25 14:02 arch/microblaze/boot/dts/system.dts
  ...
  -rw----     0.0 fat    10470 b- defN 11-Aug-25 14:02 drivers/scsi/aic94xx/aic94xx_reg.h

IOW, the zip file looks right. I wonder if this is actually a bug in "unzip".

-Peff
Previous: Jeff KingNext: Andreas Schwab
Message 3 of 7 in “"git archive" seems to be broken wrt zip files”
  1. Linus TorvaldsSep 11, 2011
  2. Jeff KingSep 11, 2011
  3. Jeff KingSep 11, 2011
  4. Andreas SchwabSep 11, 2011
  5. René ScharfeSep 11, 2011
  6. Linus TorvaldsSep 14, 2011
  7. Andreas SchwabSep 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.