From: A Large Angry SCM Date: Sun, 30 Jul 2006 18:46:43 GMT Subject: Re: [PATCH 1/1] Make git-tar-tree more flexible Message-ID: <44CCFE93.7040500@gmail.com> In-Reply-To: <20060730174847.GA32574@eve.kumria.com> Anand Kumria wrote: > If you have a project which is setup like: > project > website > and you decide you wish to generate a tar archive of _just_ the 'project' > portion, git-tar-tree is not able to help. This patch adds two parameters > which can assist. > > The first is '--pathlimit', which forces git-tar-tree to only generate the > tar archive for project; as in: > 'git tar-tree --pathlimit=project project-1.0 tag-1.0' > > The above command will mean that paths in the tar archive look like: > project-1.0/project/src/main.c > etc. > > The second parameter allows you two strip the extraneous project, as in: > 'git tar-tree --strippath=project --pathlimit=project project-1.0 tag-1.0 Which will result in tar archives looking like: > project-1.0/src/main.c > This could be made more general and more Git-ish instead, by implementing a strip common prefix option and using a double dash option to signal that the remaining arguments are the paths of interest. The synopsis would then look like: git-tar-tree [--remote=] [ --strip-common-prefix ] [ ] [ -- ... ]