From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Matt Seitz (matseitz)" <matseitz@cisco.com>
Cc: git@vger.kernel.org
Subject: Re: Symbolic link documentation
Date: Thu, 20 Sep 2007 14:11:00 -0400 [thread overview]
Message-ID: <20070920181100.GV3099@spearce.org> (raw)
In-Reply-To: <70952A932255A2489522275A628B97C3052E993B@xmb-sjc-233.amer.cisco.com>
"Matt Seitz (matseitz)" <matseitz@cisco.com> wrote:
> The git-update-index and git-update-ref manual references are the
> closest to what I was looking for. Both are more low-level and
> technical than what I was hoping for, and the discussion in
> git-update-index seems targeted primarily at how symlinks are translated
> on file systems that don't support symlinks.
>
> I guess I was looking for something like the GNU "tar" documentation of
> how symlinks are handled
> (http://www.gnu.org/software/tar/manual/html_node/dereference.html#deref
> erence).
Git never dereferences a symlink that are stored as part of the
revision data. The only time we dereference a symlink is when it
is used inside of .git/refs, or as .git/HEAD, which is what the
git-update-ref manpage was talking about.
So Git handles symlinks in the working tree *without* dereferencing
them. Internally we store the target of the symlink, much as
tar would store the target of the symlink. There is no way to
activate a dereference behavior (--dereference / -h in GNU tar)
as typically you want to preseve the symlink as a symlink to the
target; its part of your source code.
Maybe this is a good hint that the user manual should have a section
on symbolic links. Its obvious to old Git hands that a symlink is
nothing more than a file with a slightly different mode, but that
may not be obvious to people who are new to Git.
--
Shawn.
next prev parent reply other threads:[~2007-09-20 18:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 17:17 Symbolic link documentation Matt Seitz (matseitz)
2007-09-20 17:20 ` Johannes Schindelin
2007-09-20 17:27 ` Shawn O. Pearce
2007-09-20 17:52 ` Matt Seitz (matseitz)
2007-09-20 18:11 ` Shawn O. Pearce [this message]
2007-09-20 19:11 ` Matt Seitz (matseitz)
2007-09-20 19:16 ` Shawn O. Pearce
2007-09-20 17:52 ` Johannes Schindelin
2007-09-20 18:50 ` Matt Seitz
2007-09-20 17:25 ` Shawn O. Pearce
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=20070920181100.GV3099@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=matseitz@cisco.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).