git-archive for files changed in revision range

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Wednesday, February 13, 2008 - 9:03 am

Hiya,

We have a small project that is being managed in a Git repository (MSysGit =
to=20
be exact) - mostly for backups and so on. The project is a mod for the=20
computer game Civilization 4. (Actually a mod of a mod, but still...)  As=
=20
such, to release the mod to other people to actually use the only thing tha=
t=20
needs to be released is all of the files that have actually been changed. (=
The=20
actual git repository contains ~700MB of files, the vast majority of which=
=20
haven't changed since the initial import and so don't need to be downloaded=
 by=20
people).

I've managed to make it produce an archive that contains only the files tha=
t=20
have changed by using a combination of git-archive and git-whatchanged, alo=
ng=20
with grep and sed, but it's kinda unwieldly. Is there a better way of doing=
=20
this?

The command line I used was something like (This is mostly from memory):
git-archive --format=3Dzip . `git-whatchanged <start>..HEAD --pretty=3Donel=
ine=20
  | grep '^:' | sed 's/^.*\t//'` > release.zip

To produce a zip containing all of the modified and added files for the=20
revision range <start>..HEAD.

--=20
Graham Cox
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-archive for files changed in revision range, Graham Cox, (Wed Feb 13, 9:03 am)
Re: git-archive for files changed in revision range, Johannes Sixt, (Wed Feb 13, 9:43 am)
Re: git-archive for files changed in revision range, Jeff King, (Wed Feb 13, 9:43 am)
Re: git-archive for files changed in revision range, Johannes Schindelin, (Wed Feb 13, 9:37 am)