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

unexplained behavior/issue with git archive?

From
JVJan Vales <jan@jvales.net>
Date
Jul 23, 2015, 15:23 UTC
Message-ID
<55B10705.6090303@jvales.net>

hi, i seem to trigger behavior i do not understand with git archive.

I have this little 3 liner (vmdiff.sh): #!/bin/bash git diff --name-status "$2" "$3" > "$1.files" git diff --name-only "$2" "$3" |xargs -d'\n' git archive -o "$1" "$3" --

For testing purpose, lets assume this call: # ./vmdiff.sh latest.zip HEAD^1 HEAD

# cat latest.zip.files | wc -l 149021

# cat latest.zip.files | egrep "^D" | wc -l 159

# mkdir empty; cd empty; unzip latest.zip ; find * | wc -l 1090

My goal is to basically diff (parts of) filesystems against each other and create an archive with all changed files + a file list to know what files were deleted. (I currently do not care about the files permissions+ownership, and it doesnt really matter in the current problem. Also dont ask, why one would store a root-filesystem in git :)

What I do not understand: why does the zip file only contains 1090 files+dirs if the wc -l shows like 150k files and only like 159 were deleted? There should be like 149k files in that archive.

Also only the few files are all from "var" and none from etc or srv where definitely files changed in too! (and show up in latest.zip.files)

Is there a limit of files git archive can process?

lg Jan Vales -- I only read plaintext emails.

Someone @ irc://irc.fsinf.at:6667/tuwien webIRC: https://frost.fsinf.at/iris/

Next: John Keeping
Message 1 of 3 in “unexplained behavior/issue with git archive?”
  1. Jan ValesJul 23, 2015
  2. John KeepingJul 23, 2015
  3. Junio C HamanoJul 23, 2015

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.