Re: git-archive ignores submodules

2015-04-20 Thread Chris Packham
On Fri, Apr 17, 2015 at 7:59 AM, Pedro Rodrigues
prodrigues1...@gmail.com wrote:
snip

 Not completely off topic, but for consistency consider that:
 git-clone supports --recursive and --recurse-submodules, which do the
 same thing.
 git-pull and git-push only support --recurse-submodules.

It took a while to get the terminology sorted but the eventual
agreement[1] was --recurse-submodules was the best generally
applicable flag for all commands. For backwards compatibility some
commands that already had --recursive as an option have retained it

--
[1] - http://article.gmane.org/gmane.comp.version-control.git/160634
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git-archive ignores submodules

2015-04-19 Thread Kevin Daudt
On Thu, Apr 16, 2015 at 09:03:10PM +0200, Jens Lehmann wrote:
 Am 16.04.2015 um 20:09 schrieb Pedro Rodrigues:
 
 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.

I'm certainly interested.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git-archive ignores submodules

2015-04-16 Thread Fredrik Gustafsson
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.

 This simply makes git-archive unusable on this scenario.

Not completely. There's a simple workaround. Combine git submodule
foreach with git archive and make an archive for each submodule.

Not as simple as if git archive --recurse-submodule would have been
implementet, but hopefully it can make things work for you at the
moment.

-- 
Fredrik Gustafsson

phone: +46 733-608274
e-mail: iv...@iveqy.com
website: http://www.iveqy.com
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git-archive ignores submodules

2015-04-16 Thread Jens Lehmann

Am 16.04.2015 um 20:09 schrieb Pedro Rodrigues:

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.


2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson iv...@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.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git-archive ignores submodules

2015-04-16 Thread Pedro Rodrigues
I sure can. Just send me an ID I can pull and test in here (not really
into C, so this the least I can contribute).

Although, my expectations are very simple, I just expect(ed) the exact
same git-archive command to be run on submodule(s), and have an output
on a single zip|tar|whatever file.

Not completely off topic, but for consistency consider that:
git-clone supports --recursive and --recurse-submodules, which do the
same thing.
git-pull and git-push only support --recurse-submodules.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git-archive ignores submodules

2015-04-16 Thread Pedro Rodrigues
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.

2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson iv...@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.

 This simply makes git-archive unusable on this scenario.

 Not completely. There's a simple workaround. Combine git submodule
 foreach with git archive and make an archive for each submodule.

 Not as simple as if git archive --recurse-submodule would have been
 implementet, but hopefully it can make things work for you at the
 moment.

 --
 Fredrik Gustafsson

 phone: +46 733-608274
 e-mail: iv...@iveqy.com
 website: http://www.iveqy.com



-- 
Pedro Rodrigues
+244 917 774 823
+351 969 042 335
Mail: prodrigues1...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html