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

git archive, cygwin, and --git-dir vs --remote

From
BKBob Kagy <bobkagy@gmail.com>
Date
May 18, 2009, 14:37 UTC
Message-ID
<e664dae0905180737mae29811ie4cae889b3e3904f@mail.gmail.com>
I'm using git on cygwin, and am confused by behavior from git archive.

git --version git version 1.6.1.2

This command works as expected: git --git-dir=/cygdrive/w archive --format=tar --verbose --prefix=tmp/ HEAD | tar -xpf - The latest copy is retrieved and dumped to the tmp subdirectory.

However, I first went down the path of using the --remote option, as described in the git-archive man page: git archive --format=tar --verbose --prefix=tmp/ --remote=/cygdrive/w HEAD | tar -xpf -

When I use the --remote branch it seems to create the same files.  But then rather than exiting it hangs out until I kill the process, using about the same CPU % as it did when creating files.

I'm trying to use this for a scripted build process where all I need is the latest copy, not an archive.  And we're just starting with git, so while it works fine now I think we're supposed to be switch from shared drives to something more controlled, at which point I don't know that the --git-dir option will work.

I've tried searching the mailing list archive, and got overwhelmed by patches, so I apologize if this has already been discussed and I just couldn't find it.

Next: René Scharfe
Message 1 of 6 in “git archive, cygwin, and --git-dir vs --remote”
  1. Bob KagyMay 18, 2009
  2. René ScharfeMay 21, 2009
  3. Tony FinchMay 21, 2009
  4. René ScharfeMay 21, 2009
  5. upload-archive: fix infinite loop on CygwinRené Scharfe, Jun 17, 2009
  6. Tony FinchJun 18, 2009

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.