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

[ANN] First beta: Git export with hardlinks

From
TKThomas Koch <thomas@koch.ro>
Date
Feb 13, 2013, 13:17 UTC
Message-ID
<201302131417.22001.thomas@koch.ro>
In-Reply-To
<20130211171357.GF16402@sigill.intra.peff.net>
Hi,

my git_export_hardlink command should now be in a usable state. I'd appreciate any feedback: https://github.com/thkoch2001/git_export_hardlinks

I still have to choose a license: BSD/GPL/?
Jeff King:
Show 10 quoted lines
> It looks like you create the sha1->path mapping by asking the user to
> provide <tree_sha1>,<path> pairs, and then assuming that the exported
> tree at <path> exactly matches <tree_sha1>. Which it would in the
> workflow you've proposed, but it is also easy for that not to be the
> case (e.g., somebody munges a file in <path> after it has been
> exported).
> 
> So it's a bit dangerous as a general purpose tool, IMHO. It's also a
> slight pain in that you have to keep track of the tree sha1 for each
> exported path somehow.

You're right. I'd run a git reset --hard after each export to guarantee a pristine export.

The tree sha1 of the exported tree might be part of the folder name of the export or in some meta file related to the export, like

/deployments
  /2012-03-05_14-23-02_0b96bf5f72d2c282b31726b3fbff279a89220b15
    /export <- exported tree goes here
    /meta  <- git config file holding all relevant metadata: (who, when, tree,
                  commit, ref)
    /index <- git index file corresponding to the exported tree (maybe?)
  
Regards,
Thomas Koch, http://www.koch.ro
Previous: Jeff King
Message 5 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.