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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=<repo>] [ --strip-common-prefix ]
		<tree-ish> [ <base> ] [ -- <paths>... ]

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]