From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Sergio Callegari <sergio.callegari@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: symbolic link management in git-archive
Date: Mon, 31 Mar 2008 22:44:58 +0200 [thread overview]
Message-ID: <47F14D4A.2020403@lsrfire.ath.cx> (raw)
In-Reply-To: <loom.20080327T175844-199@post.gmane.org>
Sergio Callegari schrieb:
> I have a project where I need to have the same content in multiple places,
> otherwise development tools are not happy.
> Since I do most of the development on Linux, I use symbolic links. This is very
> good, not just because I save space, but particularly because I am sure that the
> content cannot loose coherency (which would be very bad) at the different
> places.
>
> Every now and then, to distribute snapshots of the project, I run git archive to
> make a zip file, that I give to other people. Unfortunately, some of them use
> Windows, where the symbolic links appear as one-liner text files. And obviously
> they cannot compile anything and they complain.
>
> So I would like git archive to be able to make zip archives with the symbolic
> links /resolved/.
Windows 2000 and up has support for symbolic links; it's just strangely
restricted, e.g. on Windows 2000 you can only link to directories and
you have to use tools that aren't shipped with the OS to create them.
Microsoft even calls them differently; here's a good starting point for
more information: http://en.wikipedia.org/wiki/NTFS_junction_point
Arguably, your unzip program should create junction points for symlinks
in zip files. I wouldn't be surprised if none of the existing ones
support that, though; junction points have been left undocumented for a
long time. It's also possible that they'd understand a different zip
dialect for symlinks than the Info-Zip one produced by git-archive.
Would it be practical for you to distribute a junction point creation
tool like Mark Russinovich's Junction (except that Junction's EULA
forbids redistribution under most circumstances; see here:
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx)
and a script that creates these symlinks for your audience?
It's harder for git-archive to support following symlinks than for e.g.
GNU tar. The reason is that the former operates on git objects, not
files, directories or symlinks. In order to follow a symlink it would
need to evaluate the symlink, follow it and then add actual files and
directories to the archive.
For your purposes, perhaps a slightly different implementation might be
sufficient: namely to follow only relative symlinks that point to
tracked objects. That way you still get a repeatable result and (most
importantly) git-archive doesn't need to look at files and directories,
it can stay safely in git land. Would such a way of operation be useful
to you?
Thanks,
René
next prev parent reply other threads:[~2008-03-31 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 11:29 symbolic link management in git-archive Sergio Callegari
2008-03-27 11:40 ` Miklos Vajna
2008-03-27 11:44 ` Johannes Schindelin
2008-03-27 12:11 ` Sergio Callegari
2008-03-27 16:31 ` Junio C Hamano
2008-03-27 18:34 ` Sergio Callegari
2008-03-27 19:05 ` Junio C Hamano
2008-03-27 19:20 ` Sergio Callegari
2008-03-31 20:44 ` René Scharfe [this message]
2008-03-31 22:12 ` Sergio Callegari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F14D4A.2020403@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=sergio.callegari@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).