threads / discuss / 25655

Yet another git archive all

Subject: Yet another git archive all

## tl;dr

2 messages between Nov 6, 2010 and Nov 7, 2010.

replies: 1people: 2as markdown or json

fREW Schmidt· Nov 6, 2010, 19:03 UTC · lore

I was trying to use this: https://github.com/meitar/git-archive-all.sh/blob/master/git-archive-all.sh

but I was having issues and am not really a bash programmer, so I wrote a new, much more minimal archive-all.

I haven't added *any* option support, it only exports as zip, and it does foo.zip as the file, but those things should be pretty easy to fix for someone who cares. Anyway, here it is!

git ls-files --cached --full-name --no-empty-directory -z | xargs -0 zip foo.zip > /dev/null git submodule --quiet foreach --recursive 'perl -e "print join qq(\0), map qq($path/\$_), split /\0/, qx(git ls-files -z --cached --full-name --no-empty-directory); print qq(\0)"' | xargs -0 zip foo.zip > /dev/null

-- fREW Schmidt http://blog.afoolishmanifesto.com

Jakub Narebski· Nov 7, 2010, 12:00 UTC · re: fREW Schmidt · lore

Re: Yet another git archive all

fREW Schmidt <frioux@gmail.com> writes:
Show 16 quoted lines
> I was trying to use this:
> https://github.com/meitar/git-archive-all.sh/blob/master/git-archive-all.sh
> 
> but I was having issues and am not really a bash programmer, so I
> wrote a new, much more minimal archive-all.
> 
> I haven't added *any* option support, it only exports as zip, and it
> does foo.zip as the file, but those things should
> be pretty easy to fix for someone who cares.  Anyway, here it is!
> 
> git ls-files --cached --full-name --no-empty-directory -z | xargs -0
> zip foo.zip > /dev/null
> git submodule --quiet foreach --recursive 'perl -e "print join qq(\0),
> map qq($path/\$_), split /\0/, qx(git ls-files -z --cached --full-name
> --no-empty-directory); print qq(\0)"' | xargs -0 zip foo.zip >
> /dev/null

If you feel it is ready for wide use, could you ad information about this project to

  https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools
Thanks in advance.
-- 
Jakub Narebski
Poland
ShadeHawk on #git

← back to recent threads