Subject: Re: Passing commit IDs to git-archive

From: René Scharfe <[email-masked]>
Date: Sat, 10 Mar 2012 07:40:23 +0100

Am 09.03.2012 23:14, schrieb Stephen Bash:
> Unfortunately I just attempted
>
>    warp:bar bash$ git archive --remote=file:///Users/bash/Development/foo \
>                               --output=test.tgz 3b9e49b \
>                               path/to/subdir
>    remote: fatal: no such ref: 3b9e49b
>    remote: git upload-archive: archiver died with error
>    fatal: sent error to the client: git upload-archive: archiver died with error

How about something like this instead?

	$ (
		cd /Users/bash/Development/foo &&
		git archive --format=tgz 3b9e49b path/to/subdir
	) >test.tgz

I.e. instead of using the --remote option, going to the target and 
creating the archive locally.  You could also keep using the --output 
parameter if you specify the target file using an absolute path, of course.

René