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

[Request] Git export with hardlinks

From
TKThomas Koch <thomas@koch.ro>
Date
Feb 6, 2013, 15:19 UTC
Message-ID
<201302061619.07765.thomas@koch.ro>
Hi,

I'd like to script a git export command that can be given a list of already exported worktrees and the tree SHA1s these worktrees correspond too. The git export command should then for every file it wants to export lookup in the existing worktrees whether an identical file is already present and in that case hardlink to the new export location instead of writing the same file again.

Use Case: A git based web deployment system that exports git trees to be served by a web server. Every new deployment is written to a new folder. After the export the web server should start serving new requests from the new folder.

It might be possible that this is premature optimization. But I'd like to learn more Python and dulwich by hacking this.

Do you have any additional thoughts or use cases about this?
Regards,
Thomas Koch, http://www.koch.ro
Next: Jeff King
Message 1 of 5 in “[Request] Git export with hardlinks”
  1. Thomas KochFeb 6, 2013
  2. Jeff KingFeb 8, 2013
  3. Thomas KochFeb 10, 2013
  4. Jeff KingFeb 11, 2013
  5. [ANN] First beta: Git export with hardlinksThomas Koch, Feb 13, 2013

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.