git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Make git-tar-tree more flexible

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Jul 30, 2006, 18:46 UTC
Message-ID
<44CCFE93.7040500@gmail.com>
In-Reply-To
<20060730174847.GA32574@eve.kumria.com>
Anand Kumria wrote:
Show 19 quoted lines
>   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=<repo>] [ --strip-common-prefix ]
		<tree-ish> [ <base> ] [ -- <paths>... ]
Previous: Anand KumriaNext: Junio C Hamano
Message 2 of 5 in “Make git-tar-tree more flexible”
  1. 1/1 Make git-tar-tree more flexibleAnand Kumria, Jul 30, 2006
  2. A Large Angry SCMJul 30, 2006
  3. Junio C HamanoJul 30, 2006
  4. Johannes SchindelinJul 31, 2006
  5. Junio C HamanoJul 31, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.