{"thread":{"id":"39096","subject":"git-archive ignores submodules","startedAt":"2015-04-16T17:35:38Z","lastAt":"2015-04-20T08:51:54Z","messageCount":7,"participants":["Pedro Rodrigues","Fredrik Gustafsson","Jens Lehmann","Kevin Daudt","Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"259519","messageId":"CAL1ZDKZs++NkLoHZ_w_YebQuZYG3rgAiH5SsaQfTmb9MPHjR3w@mail.gmail.com","threadId":"39096","inReplyTo":null,"subject":"git-archive ignores submodules","fromName":"Pedro Rodrigues","fromEmail":"prodrigues1990@gmail.com","sentAt":"2015-04-16T17:35:38Z","receivedAt":"2015-04-16T17:35:38Z","isPatch":false,"sender":{"key":"prodrigues1990@gmail.com","avatar":null},"body":"I've been using git-archive as my main way of deploying to production\nservers, but today I've come across a git repo with submodules and\nfound out that git archive has no option to include submodules on the\noutput archive.\n\nThis simply makes git-archive unusable on this scenario.\n\n-- \nPedro Rodrigues\n+244 917 774 823\n+351 969 042 335\nMail: prodrigues1990@gmail.com\n"},{"id":"259524","messageId":"20150416175623.GJ21868@paksenarrion.iveqy.com","threadId":"39096","inReplyTo":"CAL1ZDKZs++NkLoHZ_w_YebQuZYG3rgAiH5SsaQfTmb9MPHjR3w@mail.gmail.com","subject":"Re: git-archive ignores submodules","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2015-04-16T17:56:23Z","receivedAt":"2015-04-16T17:56:23Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Thu, Apr 16, 2015 at 06:35:38PM +0100, Pedro Rodrigues wrote:\n> I've been using git-archive as my main way of deploying to production\n> servers, but today I've come across a git repo with submodules and\n> found out that git archive has no option to include submodules on the\n> output archive.\n\nAs far as I know this is an known limitation that's just waiting for\nsomeone to solve. Thanks for bringing attention to it.\n\n> This simply makes git-archive unusable on this scenario.\n\nNot completely. There's a simple workaround. Combine git submodule\nforeach with git archive and make an archive for each submodule.\n\nNot as simple as if git archive --recurse-submodule would have been\nimplementet, but hopefully it can make things work for you at the\nmoment.\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"},{"id":"259525","messageId":"CAL1ZDKbcmrer481fRY2NEHUQ1J5tjRbHz2yLEcszh3Q-NjcvcQ@mail.gmail.com","threadId":"39096","inReplyTo":"20150416175623.GJ21868@paksenarrion.iveqy.com","subject":"Re: git-archive ignores submodules","fromName":"Pedro Rodrigues","fromEmail":"prodrigues1990@gmail.com","sentAt":"2015-04-16T18:09:47Z","receivedAt":"2015-04-16T18:09:47Z","isPatch":false,"sender":{"key":"prodrigues1990@gmail.com","avatar":null},"body":"Good to know about git submodule foreach.\n\nSimpler yet, I'm using:\n\nzip -r ../project.zip . -x *.git*\n\nWhich essentially does the same thing I would need from git-archive\n--recurse-submodule, zip everything excluding .git folders. Still\nwould be better to use git itself.\n\n2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson <iveqy@iveqy.com>:\n> On Thu, Apr 16, 2015 at 06:35:38PM +0100, Pedro Rodrigues wrote:\n>> I've been using git-archive as my main way of deploying to production\n>> servers, but today I've come across a git repo with submodules and\n>> found out that git archive has no option to include submodules on the\n>> output archive.\n>\n> As far as I know this is an known limitation that's just waiting for\n> someone to solve. Thanks for bringing attention to it.\n>\n>> This simply makes git-archive unusable on this scenario.\n>\n> Not completely. There's a simple workaround. Combine git submodule\n> foreach with git archive and make an archive for each submodule.\n>\n> Not as simple as if git archive --recurse-submodule would have been\n> implementet, but hopefully it can make things work for you at the\n> moment.\n>\n> --\n> Fredrik Gustafsson\n>\n> phone: +46 733-608274\n> e-mail: iveqy@iveqy.com\n> website: http://www.iveqy.com\n\n\n\n-- \nPedro Rodrigues\n+244 917 774 823\n+351 969 042 335\nMail: prodrigues1990@gmail.com\n"},{"id":"259535","messageId":"5530076E.50605@web.de","threadId":"39096","inReplyTo":"CAL1ZDKbcmrer481fRY2NEHUQ1J5tjRbHz2yLEcszh3Q-NjcvcQ@mail.gmail.com","subject":"Re: git-archive ignores submodules","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2015-04-16T19:03:10Z","receivedAt":"2015-04-16T19:03:10Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 16.04.2015 um 20:09 schrieb Pedro Rodrigues:\n> Good to know about git submodule foreach.\n>\n> Simpler yet, I'm using:\n>\n> zip -r ../project.zip . -x *.git*\n>\n> Which essentially does the same thing I would need from git-archive\n> --recurse-submodule, zip everything excluding .git folders. Still\n> would be better to use git itself.\n\nYes.\n\n> 2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson <iveqy@iveqy.com>:\n>> On Thu, Apr 16, 2015 at 06:35:38PM +0100, Pedro Rodrigues wrote:\n>>> I've been using git-archive as my main way of deploying to production\n>>> servers, but today I've come across a git repo with submodules and\n>>> found out that git archive has no option to include submodules on the\n>>> output archive.\n>>\n>> As far as I know this is an known limitation that's just waiting for\n>> someone to solve. Thanks for bringing attention to it.\n\nI just rebased a patch Lars Hjemli posted in 2009 (which I kept in my\nGitHub repo to resurrect it when I find the time) to current master:\n\nhttps://github.com/jlehmann/git-submod-enhancements/commits/archive--submodules\n\nSee gmane/$107030 for its original posting. Apart from renaming the\n'--submodule' option to '--recurse-submodules' and solving a merge\nconflict I didn't change anything. Not sure why it wasn't accepted\nback then, I'll have to read that thread more closely ...\n\nIf people are interested I could try to polish it and resubmit it.\nIt would be great if Pedro could test that it does what he expects.\n"},{"id":"259538","messageId":"CAL1ZDKbvNvTA3CFg5iWMYpOVDbxFwtpFCu+PO2onssO=+pw5XQ@mail.gmail.com","threadId":"39096","inReplyTo":"5530076E.50605@web.de","subject":"Re: git-archive ignores submodules","fromName":"Pedro Rodrigues","fromEmail":"prodrigues1990@gmail.com","sentAt":"2015-04-16T19:59:46Z","receivedAt":"2015-04-16T19:59:46Z","isPatch":false,"sender":{"key":"prodrigues1990@gmail.com","avatar":null},"body":"I sure can. Just send me an ID I can pull and test in here (not really\ninto C, so this the least I can contribute).\n\nAlthough, my expectations are very simple, I just expect(ed) the exact\nsame git-archive command to be run on submodule(s), and have an output\non a single zip|tar|whatever file.\n\nNot completely off topic, but for consistency consider that:\ngit-clone supports --recursive and --recurse-submodules, which do the\nsame thing.\ngit-pull and git-push only support --recurse-submodules.\n"},{"id":"259648","messageId":"20150419161939.GC29542@vps892.directvps.nl","threadId":"39096","inReplyTo":"5530076E.50605@web.de","subject":"Re: git-archive ignores submodules","fromName":"Kevin Daudt","fromEmail":"me@ikke.info","sentAt":"2015-04-19T16:19:39Z","receivedAt":"2015-04-19T16:19:39Z","isPatch":false,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Thu, Apr 16, 2015 at 09:03:10PM +0200, Jens Lehmann wrote:\n> Am 16.04.2015 um 20:09 schrieb Pedro Rodrigues:\n> \n> If people are interested I could try to polish it and resubmit it.\n> It would be great if Pedro could test that it does what he expects.\n\nI'm certainly interested.\n"},{"id":"259666","messageId":"CAFOYHZAZvidjtTzyhF2_nD_bi27H-h=GT4F-MKm+h3RT5LB_gw@mail.gmail.com","threadId":"39096","inReplyTo":"CAL1ZDKbvNvTA3CFg5iWMYpOVDbxFwtpFCu+PO2onssO=+pw5XQ@mail.gmail.com","subject":"Re: git-archive ignores submodules","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2015-04-20T08:51:54Z","receivedAt":"2015-04-20T08:51:54Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Fri, Apr 17, 2015 at 7:59 AM, Pedro Rodrigues\n<prodrigues1990@gmail.com> wrote:\n<snip>\n\n> Not completely off topic, but for consistency consider that:\n> git-clone supports --recursive and --recurse-submodules, which do the\n> same thing.\n> git-pull and git-push only support --recurse-submodules.\n\nIt took a while to get the terminology sorted but the eventual\nagreement[1] was \"--recurse-submodules\" was the best generally\napplicable flag for all commands. For backwards compatibility some\ncommands that already had \"--recursive\" as an option have retained it\n\n--\n[1] - http://article.gmane.org/gmane.comp.version-control.git/160634\n"}]}