lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Symlink .git/hooks


From: Vadim Zeitlin
Subject: Re: [lmi] Symlink .git/hooks
Date: Sat, 5 Nov 2016 17:48:06 +0100

On Sat, 5 Nov 2016 15:09:35 +0000 Greg Chicares <address@hidden> wrote:

GC> Wait...I have a new hypothesis: the symlink target is an absolute
GC> path, in a chroot, so it's actually relative to the chroot's root:

 Yes, this is definitely the explanation for what you're seeing, it's quite
unrelated to nautilus, if you look at the symlink from the shell prompt
when running outside of the chroot, you'd see exactly the same thing, i.e.
the symlink would be broken.

GC> What is the best general practice--to create symlinks with
GC> absolute targets, or relative ones? I find conflicting advice:

 I hesitate to formulate a general advice, but in this particular case
using relative path seems clearly more appropriate: this ensures that the
link works from both the chroot and the main system and, perhaps more
importantly, also that it continues to work if you move the entire git
checkout somewhere else. OTOH I don't see what do you gain by using the
absolute path here.

GC> I don't find these GNU/Linux file managers all that useful, so I
GC> don't really much care whether 'nautilus' interprets this symlink
GC> correctly. If I did, then I guess it would have to be relative. But
GC> my only concern is whether the file managers' error messages were
GC> pointing out a genuine latent problem.

 This isn't necessarily a problem, e.g. if you plan to never use the
repository from the main system (although I don't really see why would you
want to avoid it), who cares that the symlink is broken there. But, again,
using a relative path for the link would avoid this maybe-a-problem
completely in the first place.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]