threads / discuss / 30289

git-archive and submodules

Subject: git-archive and submodules

## tl;dr

6 messages between Apr 19, 2012 and Oct 10, 2013.

replies: 5people: 5as markdown or json

André Caron· Apr 19, 2012, 20:10 UTC · lore
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

Jens Lehmann· Apr 20, 2012, 08:11 UTC · re: André Caron · lore

Re: git-archive and submodules

Am 19.04.2012 22:10, schrieb André Caron:
Show 16 quoted lines
> 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?

The idea is not rejected, this would be a worthwhile addition. It has been brought up again last May, but as far as I know it is stalled since then: http://comments.gmane.org/gmane.comp.version-control.git/172851

André Caron· Apr 20, 2012, 18:32 UTC · re: Jens Lehmann · lore

Fwd: git-archive and submodules

Hi Robert,

I've recently raised the same submodule issue with git-archive you and Lars have in the past.

What's the status on your application of the git-archive submodule patch? Have you applied the changes suggested by Lens Lehmann[1]? Your Git fork on GitHub[2] seems to have only applied Lars' patch and an unrelated SVN glob fix...

Since you've touched this only last year, I'd like to know where you were at and I can see if I can pick up where you left off (unless you want to finish yourself).

Thanks, André

[1]: http://comments.gmane.org/gmane.comp.version-control.git/172851 [2]: https://github.com/darconeous/git

---------- Forwarded message ----------
From: Jens Lehmann <Jens.Lehmann@web.de>
Date: Fri, Apr 20, 2012 at 4:11 AM
Subject: Re: git-archive and submodules
To: André Caron <andre.l.caron@gmail.com>
Cc: git@vger.kernel.org
Am 19.04.2012 22:10, schrieb André Caron:
Show 16 quoted lines
> 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?

The idea is not rejected, this would be a worthwhile addition. It has been brought up again last May, but as far as I know it is stalled since then: http://comments.gmane.org/gmane.comp.version-control.git/172851

Robert Quattlebaum· Apr 22, 2012, 18:47 UTC · re: André Caron · lore

Re: git-archive and submodules

I got too busy to continue working to get it included. Please feel free to pick up where I left off. 
Sent from my iPad
On Apr 20, 2012, at 2:32 PM, André Caron <andre.l.caron@gmail.com> wrote:
Show 52 quoted lines
> Hi Robert,
> 
> I've recently raised the same submodule issue with git-archive you and
> Lars have in the past.
> 
> What's the status on your application of the git-archive submodule
> patch?  Have you applied the changes suggested by Lens Lehmann[1]?
> Your Git fork on GitHub[2] seems to have only applied Lars' patch and
> an unrelated SVN glob fix...
> 
> Since you've touched this only last year, I'd like to know where you
> were at and I can see if I can pick up where you left off (unless you
> want to finish yourself).
> 
> Thanks,
> André
> 
> [1]: http://comments.gmane.org/gmane.comp.version-control.git/172851
> [2]: https://github.com/darconeous/git
> 
> 
> ---------- Forwarded message ----------
> From: Jens Lehmann <Jens.Lehmann@web.de>
> Date: Fri, Apr 20, 2012 at 4:11 AM
> Subject: Re: git-archive and submodules
> To: André Caron <andre.l.caron@gmail.com>
> Cc: git@vger.kernel.org
> 
> 
> Am 19.04.2012 22:10, schrieb André Caron:
>> 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?
> 
> The idea is not rejected, this would be a worthwhile addition. It has
> been brought up again last May, but as far as I know it is stalled
> since then:
> http://comments.gmane.org/gmane.comp.version-control.git/172851
> 
Damien Regad· Oct 10, 2013, 14:09 UTC · re: Robert Quattlebaum · lore

Re: git-archive and submodules

Robert Quattlebaum <darco <at> deepdarc.com> writes:
> I got too busy to continue working to get it included. Please feel free to
pick up where I left off. 
Show 5 quoted lines
> 
> On Apr 20, 2012, at 2:32 PM, André Caron <andre.l.caron <at> gmail.com> wrote:
> > Since you've touched this only last year, I'd like to know where you
> > were at and I can see if I can pick up where you left off (unless you
> > want to finish yourself).
Greetings

I was just wondering whether there been any progress on this topic since last year... André ?

Cheers Damien

Amit Bakshi· Oct 10, 2013, 19:22 UTC · re: Damien Regad · lore

Re: git-archive and submodules

I wrote a simple bash script that does git-archive recursively with submodules. It first does a full mirror clone of the repo and submodules, so that subsequent calls are faster.

https://github.com/ambakshi/git-archiver
Amit
On Thu, Oct 10, 2013 at 7:09 AM, Damien Regad <dregad@mantisbt.org> wrote:
Show 23 quoted lines
> Robert Quattlebaum <darco <at> deepdarc.com> writes:
>> I got too busy to continue working to get it included. Please feel free to
> pick up where I left off.
>>
>> On Apr 20, 2012, at 2:32 PM, André Caron <andre.l.caron <at> gmail.com> wrote:
>> > Since you've touched this only last year, I'd like to know where you
>> > were at and I can see if I can pick up where you left off (unless you
>> > want to finish yourself).
>
> Greetings
>
> I was just wondering whether there been any progress on this topic since
> last year... André ?
>
> Cheers
> Damien
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

← back to recent threads