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

git-archive and submodules

From
ACAndré Caron <andre.l.caron@gmail.com>
Date
Apr 19, 2012, 20:10 UTC
Message-ID
<CALKBF2gwVr0rPn0y8=cvwqOsUb7eQPH7EdK5U+gfZMzh=RpiKw@mail.gmail.com>
Hi,

I've recently needed to create a source code archive as part of a custom build target. This repository uses submodules and I need to include the submodlule's source code in the archives too. However, git-archive does not have any option to do so.

I've taken a quick look at the GMANE mailing list archives and it seems this provoked quite a discussion in 2009 and that Lars Hjemli even wrote a patch (in several flavors) for archive.c to include submodule-aware processing. The lastest source code at `git.kernel.org` does not contain any traces of this patch (or submodule aware logic for that matter). The mailing list archives are not very convenient to browse and I can't figure out what the status on this submodule-aware git-archive idea is. Has this idea been completely rejected, or is it still work in progress?

In case you're wondering, I don't seem to be the only one needing to do this. I found at least two scripts on GitHub that implement this logic with various levels of accuracy/completeness[1][2] and I've hacked an icky Windows batch file version [3] for minimal Windows support until this feature can be implemented in Git itself. I don't mind putting in some time into a real patch if I need to, but I'm curious about the fact that this has been requested before, a patch was proposed and yet this is still not merged 4 years later.

So, what's the status on a submodule-aware git-archive command?

Thanks, André

[1]: https://github.com/meitar/git-archive-all.sh [2]: https://github.com/Kentzo/git-archive-all [3]: https://github.com/AndreLouisCaron/git-archive-all.bat

Next: Jens Lehmann
Message 1 of 6 in “git-archive and submodules”
  1. André CaronApr 19, 2012
  2. Jens LehmannApr 20, 2012
  3. Fwd: git-archive and submodulesAndré Caron, Apr 20, 2012
  4. Robert QuattlebaumApr 22, 2012
  5. Damien RegadOct 10, 2013
  6. Amit BakshiOct 10, 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.