git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: symbolic link management in git-archive

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2008, 19:05 UTC
Message-ID
<7vd4pg9edm.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<loom.20080327T175844-199@post.gmane.org>
Sergio Callegari <sergio.callegari@gmail.com> writes:
Show 6 quoted lines
> 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.

Previous: Sergio CallegariNext: Sergio Callegari
Message 7 of 10 in “symbolic link management in git-archive”
  1. Sergio CallegariMar 27, 2008
  2. Miklos VajnaMar 27, 2008
  3. Johannes SchindelinMar 27, 2008
  4. Sergio CallegariMar 27, 2008
  5. Junio C HamanoMar 27, 2008
  6. Sergio CallegariMar 27, 2008
  7. Junio C HamanoMar 27, 2008
  8. Sergio CallegariMar 27, 2008
  9. René ScharfeMar 31, 2008
  10. Sergio CallegariMar 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.