Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Bug: git archive not doing export-subst when using --prefix= option

From: Ulrik Sverdrup <hidden>
Date: 2016-06-15 22:44:27

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help