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

Re: multiple working directories for long-running builds (was: "git merge" merges too much!)

From
Jeff Epler <jepler@unpythonic.net>
Date
Dec 1, 2009, 22:25 UTC
Message-ID
<20091201222526.GB1926@unpythonic.net>
In-Reply-To
<20091201211830.GE11235@dpotapov.dyndns.org>
On Wed, Dec 02, 2009 at 12:18:30AM +0300, Dmitry Potapov wrote:
> AFAIK, "git archive" is cheaper than git clone. I do not say it is fast
> for huge project, but if you want to run a process such as clean build
> and test that takes a long time anyway, it does not add much to the
> total time.

If you want to keep a separate copy of your source tree in order to get consistent builds, "git archive" is not much cheaper in disk space or in time, at least on this unix system:

$ find orig -exec md5sum {} + > /dev/null 2>&1 # ensure hot cache $ time git clone orig temp-clone Initialized empty Git repository in /usr/local/jepler/src/temp-clone/.git/ 0.6 real 0.3 user 0.6 system $ time (GIT_DIR=orig/.git git archive --format tar --prefix temp-archive/ HEAD | tar xf -) 0.5 real 0.2 user 0.5 system $ du -s orig temp-clone temp-archive 41880 orig 14640 temp-clone # du excludes files already accounted for by 'orig' 14304 temp-archive

.. and the next run to bring temp-clone up to date can be even faster, since it's just 'git pull' and will only touch changed files.

Jeff
Previous: Dmitry PotapovNext: Greg A. Woods
Message 29 of 33 in “"git merge" merges too much!”
  1. Greg A. WoodsNov 29, 2009
  2. Jeff KingNov 29, 2009
  3. Greg A. WoodsNov 30, 2009
  4. Dmitry PotapovNov 30, 2009
  5. Greg A. WoodsDec 1, 2009
  6. Dmitry PotapovDec 1, 2009
  7. Greg A. WoodsDec 1, 2009
  8. Dmitry PotapovDec 2, 2009
  9. Nanako ShiraishiDec 2, 2009
  10. Jeff KingDec 2, 2009
  11. Greg A. WoodsDec 3, 2009
  12. Junio C HamanoDec 3, 2009
  13. Greg A. WoodsDec 3, 2009
  14. Jeff KingDec 3, 2009
  15. Uri OkrentDec 3, 2009
  16. Marko KreenDec 3, 2009
  17. Greg A. WoodsDec 9, 2009
  18. Jeff KingDec 3, 2009
  19. Junio C HamanoNov 29, 2009
  20. Greg A. WoodsNov 30, 2009
  21. Junio C HamanoNov 30, 2009
  22. Dmitry PotapovNov 30, 2009
  23. Greg A. WoodsDec 1, 2009
  24. Dmitry PotapovDec 1, 2009
  25. Greg A. WoodsDec 1, 2009
  26. Dmitry PotapovDec 1, 2009
  27. Greg A. WoodsDec 1, 2009
  28. Dmitry PotapovDec 1, 2009
  29. Jeff EplerDec 1, 2009
  30. Greg A. WoodsDec 1, 2009
  31. Dmitry PotapovDec 2, 2009
  32. Greg A. WoodsDec 3, 2009
  33. Junio C HamanoDec 2, 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.