# git-archive and submodules

6 messages from 2012-04-19 to 2013-10-10. Participants: André Caron, Jens Lehmann, Robert Quattlebaum, Damien Regad, Amit Bakshi.
Thread: https://gitlist.dev/t/30289

## André Caron, 2012-04-19 20:10

Subject: git-archive and submodules
Message-ID: <CALKBF2gwVr0rPn0y8=cvwqOsUb7eQPH7EdK5U+gfZMzh=RpiKw@mail.gmail.com>
URL: https://gitlist.dev/e/CALKBF2gwVr0rPn0y8%3DcvwqOsUb7eQPH7EdK5U%2BgfZMzh%3DRpiKw%40mail.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

```

## Jens Lehmann, 2012-04-20 08:11

Subject: Re: git-archive and submodules
Message-ID: <4F911A2C.4070306@web.de>
URL: https://gitlist.dev/e/4F911A2C.4070306%40web.de
In-Reply-To: <CALKBF2gwVr0rPn0y8=cvwqOsUb7eQPH7EdK5U+gfZMzh=RpiKw@mail.gmail.com>

```
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

```

## André Caron, 2012-04-20 18:32

Subject: Fwd: git-archive and submodules
Message-ID: <CALKBF2jzL5-mHaVi1erA=EiF_DALF1Rvwv7yB5CfdEdQa2ZhBg@mail.gmail.com>
URL: https://gitlist.dev/e/CALKBF2jzL5-mHaVi1erA%3DEiF_DALF1Rvwv7yB5CfdEdQa2ZhBg%40mail.gmail.com
In-Reply-To: <4F911A2C.4070306@web.de>

```
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

```

## Robert Quattlebaum, 2012-04-22 18:47

Subject: Re: git-archive and submodules
Message-ID: <49D85565-3932-4B03-9568-E5CB75F39B9E@deepdarc.com>
URL: https://gitlist.dev/e/49D85565-3932-4B03-9568-E5CB75F39B9E%40deepdarc.com
In-Reply-To: <CALKBF2jzL5-mHaVi1erA=EiF_DALF1Rvwv7yB5CfdEdQa2ZhBg@mail.gmail.com>

```
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:

> 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, 2013-10-10 14:09

Subject: Re: git-archive and submodules
Message-ID: <loom.20131010T160446-236@post.gmane.org>
URL: https://gitlist.dev/e/loom.20131010T160446-236%40post.gmane.org
In-Reply-To: <49D85565-3932-4B03-9568-E5CB75F39B9E@deepdarc.com>

```
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

```

## Amit Bakshi, 2013-10-10 19:22

Subject: Re: git-archive and submodules
Message-ID: <CAFGOX=WL8GEpZc1b0Rcqt_tMyOzL-nB20Jj=7PArOh82T34JoA@mail.gmail.com>
URL: https://gitlist.dev/e/CAFGOX%3DWL8GEpZc1b0Rcqt_tMyOzL-nB20Jj%3D7PArOh82T34JoA%40mail.gmail.com
In-Reply-To: <loom.20131010T160446-236@post.gmane.org>

```
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:
> 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

```
