git-archive and submodules
- From
- André 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