Re: git-archive ignores submodules
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Apr 16, 2015, 19:03 UTC
- Message-ID
- <5530076E.50605@web.de>
- In-Reply-To
- <CAL1ZDKbcmrer481fRY2NEHUQ1J5tjRbHz2yLEcszh3Q-NjcvcQ@mail.gmail.com>
Am 16.04.2015 um 20:09 schrieb Pedro Rodrigues:
Show 9 quoted lines
> Good to know about git submodule foreach. > > Simpler yet, I'm using: > > zip -r ../project.zip . -x *.git* > > Which essentially does the same thing I would need from git-archive > --recurse-submodule, zip everything excluding .git folders. Still > would be better to use git itself.
Yes.
Show 9 quoted lines
> 2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson <iveqy@iveqy.com>: >> On Thu, Apr 16, 2015 at 06:35:38PM +0100, Pedro Rodrigues wrote: >>> I've been using git-archive as my main way of deploying to production >>> servers, but today I've come across a git repo with submodules and >>> found out that git archive has no option to include submodules on the >>> output archive. >> >> As far as I know this is an known limitation that's just waiting for >> someone to solve. Thanks for bringing attention to it.
I just rebased a patch Lars Hjemli posted in 2009 (which I kept in my GitHub repo to resurrect it when I find the time) to current master:
https://github.com/jlehmann/git-submod-enhancements/commits/archive--submodules
See gmane/$107030 for its original posting. Apart from renaming the '--submodule' option to '--recurse-submodules' and solving a merge conflict I didn't change anything. Not sure why it wasn't accepted back then, I'll have to read that thread more closely ...
If people are interested I could try to polish it and resubmit it. It would be great if Pedro could test that it does what he expects.