Re: git-archive for files changed in revision range

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

 



Hi,

On Wed, 13 Feb 2008, Graham Cox wrote:

> We have a small project that is being managed in a Git repository 
> (MSysGit to be exact) - mostly for backups and so on. The project is a 
> mod for the computer game Civilization 4. (Actually a mod of a mod, but 
> still...)  As such, to release the mod to other people to actually use 
> the only thing that needs to be released is all of the files that have 
> actually been changed. (The actual git repository contains ~700MB of 
> files, the vast majority of which haven't changed since the initial 
> import and so don't need to be downloaded by people).
> 
> I've managed to make it produce an archive that contains only the files 
> that have changed by using a combination of git-archive and 
> git-whatchanged, along with grep and sed, but it's kinda unwieldly. Is 
> there a better way of doing this?
> 
> The command line I used was something like (This is mostly from memory):
> git-archive --format=zip . `git-whatchanged <start>..HEAD --pretty=oneline 
>   | grep '^:' | sed 's/^.*\t//'` > release.zip
> 
> To produce a zip containing all of the modified and added files for the 
> revision range <start>..HEAD.

Mebbe

	git archive --format=zip HEAD \
		$(git diff-tree -r --name-only --diff-filter=AM \
			<start>..HEAD)

Hmm?

Ciao,
Dscho

-
To unsubscribe from this list: 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]

  Powered by Linux