Subject: Re: [PATCH 1/2] Add git-archive

From: Rene Scharfe <[email-masked]>
Date: Fri, 08 Sep 2006 22:21:30 +0200

Jakub Narebski schrieb:
> Rene Scharfe wrote:
> 
>> IMHO should work like in the following example, and the code above 
>> cuts off the Documentation part:
>> 
>> $ cd Documentation $ git-archive --format=tar --prefix=v1.0/ HEAD howto | tar tf - 
>> v1.0/howto/ 
>> v1.0/howto/isolate-bugs-with-bisect.txt ...
>> 
>> I agree that simple subtree matching would be enough, at least for 
>> now.
> 
> What about
> 
> $ git-archive --format=tar --prefix=v1.0/ HEAD:Documentation/howto

That is fine, too (cutting off Documentation/howto).

My comment above was about the piece of code that handles cd'ing around in
the repository.  git-tar-tree ignores the current working directory -- you
always get the full tree put into your tar file, and you have to do the
"trick" you mentioned if you want to archive only a subtree.  This is a bit
strange, so I think we should do it right from the start in git-archive.

René