git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: git archive not doing export-subst when using --prefix= option
@ 2008-04-08 21:35 Ulrik Sverdrup
  2008-04-09 21:14 ` [PATCH] git-archive: ignore prefix when checking file attribute René Scharfe
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrik Sverdrup @ 2008-04-08 21:35 UTC (permalink / raw)
  To: git

In one of my small projects, I just tried to add an export-subst format to
my version file to have the git version in the released tarball. However it
seems git-archive --prefix="tarballname-version/" does not work well
together with export-subst.

I have very old git! (v1.5.4.4). So please help me and try to reproduce
this with newer versions:

The repo is publicly available at

git clone git://repo.or.cz/dragbox.git

The file in the repo having an export substitution format is
Dragbox/version.py.in

Now try to export the git tree with git-archive, with and without --prefix=
We will do some hackery and grep the binary output.

	$ git archive HEAD | grep --text "git_version"
	git_version = "9c3f6c0af7e67a354cac9a24e24e2057d17778ef"
	$ git archive --prefix="dragbox-git/" HEAD | grep --text "git_version"
	git_version = "$Format:%H$"


I noticed in another even smaller repository that it would not behave the
same but equally spurious; it would only perform the substitution for some
prefixes and not for others (for example with or without ending slash)

Regards
Ulrik Sverdrup

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-10 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 21:35 Bug: git archive not doing export-subst when using --prefix= option Ulrik Sverdrup
2008-04-09 21:14 ` [PATCH] git-archive: ignore prefix when checking file attribute René Scharfe
2008-04-09 22:58   ` Ulrik Sverdrup
2008-04-10 10:56   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).