Re: [PATCH 1/2] Add git-archive
- From
Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Sep 8, 2006, 20:21 UTC
- Message-ID
- <4501D0CA.7000206@lsrfire.ath.cx>
- In-Reply-To
- <ednb29$u0u$1@sea.gmane.org>
Jakub Narebski schrieb:
Show 15 quoted lines
> 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é