Subject: Re: symbolic link management in git-archive

From: Junio C Hamano <[email-masked]>
Date: Thu, 27 Mar 2008 12:05:25 -0700

Sergio Callegari <[email-masked]> writes:

> Unless Y is also in the tracked project...
> ...
> Note that if Y is outside of the tracked project and I make an archive,
> and then I give the archive to my friend X, Mr. X will see the same
> symbolic link, but still a completely and randomly different content
> than I do, depending on where he is unpacking the archive.

If you _do_ keep track of Y in a separate repository, I think two archives
(the one that has a pointer to Y, and the other that is taken from the
repository Y _at the revision you are using_), would solve that more
naturally.  Then the version markers recorded in the archives would still
be valid.

	Side note.  If we ever teach git-archive to create a recursive
	tarball that contains a submodule, we should be doing something
	like that, not necessarily as two separate tarballs but possibly
	with a single tarball that has two comments that describe the
	revision of the toplevel and the submodule.

> ...  In the end git archive is a nice shorthand for a checkout and a
> successive run of zip or tar and both zip and tar have a switch to
> control this dereferencing behaviour (BTW, zip on my distro dereferences
> by default, the switch is to store symbolic links).

Under such an option, at least the comment in the archive (both for zip
and tar) that notes which revision the tarball was taken from should be
omitted.  As long as that is done, I think it is Ok to have such an
optional behaviour.