{"thread":{"id":"9950","subject":"Symbolic link documentation","startedAt":"2007-09-20T17:17:58Z","lastAt":"2007-09-20T19:16:51Z","messageCount":10,"participants":["Matt Seitz (matseitz)","Johannes Schindelin","Shawn O. Pearce","Matt Seitz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"53657","messageId":"70952A932255A2489522275A628B97C3052E98EB@xmb-sjc-233.amer.cisco.com","threadId":"9950","inReplyTo":null,"subject":"Symbolic link documentation","fromName":"Matt Seitz (matseitz)","fromEmail":"matseitz@cisco.com","sentAt":"2007-09-20T17:17:58Z","receivedAt":"2007-09-20T17:17:58Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"Where does the git user documentation discuss how git handles symbolic\nlinks?\n\n\n--\nMatt Seitz\nManager, File System Virtualization\nCisco Systems, Inc.\n.:|:.:|:. \n\n\nBEGIN:VCARD\nVERSION:2.1\nN:Seitz;Matt\nFN:Matt Seitz\nORG:Cisco Systems, Inc\nTITLE:Manager\nTEL;WORK;VOICE:408-200-8000\nADR;WORK:;;3975 Freedom Circle, Floor 8;Santa Clara;CA;95054;United States of America\nLABEL;WORK;ENCODING=QUOTED-PRINTABLE:3975 Freedom Circle, Floor 8=0D=0ASanta Clara, CA 95054=0D=0AUnited States o=\nf America\nEMAIL;PREF;INTERNET:matseitz@cisco.com\nREV:20070709T234049Z\nEND:VCARD\n"},{"id":"53658","messageId":"Pine.LNX.4.64.0709201819340.28395@racer.site","threadId":"9950","inReplyTo":"70952A932255A2489522275A628B97C3052E98EB@xmb-sjc-233.amer.cisco.com","subject":"Re: Symbolic link documentation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-09-20T17:20:02Z","receivedAt":"2007-09-20T17:20:02Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 20 Sep 2007, Matt Seitz (matseitz) wrote:\n\n> Where does the git user documentation discuss how git handles symbolic \n> links?\n\n$ git grep symbolic Documentation/ | grep link\nDocumentation/RelNotes-1.5.0.2.txt:    in place of the symbolic link.  The default strategy,\nDocumentation/RelNotes-1.5.0.2.txt:    that was pointed at by the symbolic link.  Both of these\nDocumentation/RelNotes-1.5.0.2.txt:    when changes to a symbolic link conflicted.  It should have\nDocumentation/RelNotes-1.5.0.2.txt:    file the symbolic link pointed at.\nDocumentation/RelNotes-1.5.1.5.txt:    directory $PWD points at is a symbolic link.\nDocumentation/RelNotes-1.5.1.6.txt:    directory $PWD points at is a symbolic link.\nDocumentation/RelNotes-1.5.1.txt:    in place of the symbolic link.  The default strategy,\nDocumentation/RelNotes-1.5.1.txt:    that was pointed at by the symbolic link.  Both of these\nDocumentation/RelNotes-1.5.1.txt:    when changes to a symbolic link conflicted.  It should have\nDocumentation/RelNotes-1.5.1.txt:    file the symbolic link pointed at.\nDocumentation/RelNotes-1.5.3.2.txt:   - an untracked symbolic link to a directory made it fart;\nDocumentation/config.txt:\tIf false, symbolic links are checked out as small plain files that\nDocumentation/config.txt:\tsymbolic links. True by default.\nDocumentation/config.txt:\tand other symbolic reference files, use symbolic links.\nDocumentation/config.txt:\texpect HEAD to be a symbolic link.\nDocumentation/core-tutorial.txt:   This is similar to a symbolic link and points at\nDocumentation/git-local-fetch.txt:\tInstead of regular file-to-file copying use symbolic links to the objects\nDocumentation/git-symbolic-ref.txt:In the past, `.git/HEAD` was a symbolic link pointing at\nDocumentation/git-symbolic-ref.txt:advertised (horrors).  Therefore symbolic links are now deprecated\nDocumentation/git-update-index.txt:to 'false' (see gitlink:git-config[1]), symbolic links are checked out\nDocumentation/git-update-index.txt:from symbolic link to regular file.\nDocumentation/git-update-ref.txt:these symbolic pointers, whether they are symlinks or these\nDocumentation/git-update-ref.txt:\"regular file symbolic refs\".  It follows *real* symlinks only\nDocumentation/glossary.txt:\treferences are manipulated with the gitlink:git-symbolic-ref[1]\nDocumentation/repository-layout.txt:\ta symbolic link instead of a symref that points at the current\nDocumentation/technical/racy-git.txt:files vs symbolic links) and executable bits (only for regular\n\nHth,\nDscho\n"},{"id":"53659","messageId":"20070920172512.GT3099@spearce.org","threadId":"9950","inReplyTo":"70952A932255A2489522275A628B97C3052E98EB@xmb-sjc-233.amer.cisco.com","subject":"Re: Symbolic link documentation","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-20T17:25:12Z","receivedAt":"2007-09-20T17:25:12Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Matt Seitz (matseitz)\" <matseitz@cisco.com> wrote:\n> Where does the git user documentation discuss how git handles symbolic\n> links?\n\nAbout the only mention I can find appears to be in git-config where\nit talks a little bit about the core.symlinks configuration option.\n\nBut in general Git treats symlinks as though they were plain text\nfiles.  The content of the \"file\" is the target of the symlink.\nUse `git-add link` to stage the symlink for the next commit (just\nlike a file), `git-mv` to rename a symlink (just like a file), etc.\nEditing a symlink to point to a new target is just a matter of\nusing the OS' tools (e.g. `ln -sf newdst link`).\n\nSo long as core.symlinks isn't set or is set to true Git will\nrecreate the symlink upon checkout of the revision, just like it\nrecreates plain text files.\n\n-- \nShawn.\n"},{"id":"53660","messageId":"20070920172736.GU3099@spearce.org","threadId":"9950","inReplyTo":"Pine.LNX.4.64.0709201819340.28395@racer.site","subject":"Re: Symbolic link documentation","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-20T17:27:36Z","receivedAt":"2007-09-20T17:27:36Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Thu, 20 Sep 2007, Matt Seitz (matseitz) wrote:\n> \n> > Where does the git user documentation discuss how git handles symbolic \n> > links?\n> \n> $ git grep symbolic Documentation/ | grep link\n> Documentation/RelNotes-1.5.0.2.txt:    in place of the symbolic link.  The default strategy,\n> Documentation/RelNotes-1.5.0.2.txt:    that was pointed at by the symbolic link.  Both of these\n> Documentation/RelNotes-1.5.0.2.txt:    when changes to a symbolic link conflicted.  It should have\n> Documentation/RelNotes-1.5.0.2.txt:    file the symbolic link pointed at.\n> Documentation/RelNotes-1.5.1.5.txt:    directory $PWD points at is a symbolic link.\n> Documentation/RelNotes-1.5.1.6.txt:    directory $PWD points at is a symbolic link.\n> Documentation/RelNotes-1.5.1.txt:    in place of the symbolic link.  The default strategy,\n> Documentation/RelNotes-1.5.1.txt:    that was pointed at by the symbolic link.  Both of these\n> Documentation/RelNotes-1.5.1.txt:    when changes to a symbolic link conflicted.  It should have\n> Documentation/RelNotes-1.5.1.txt:    file the symbolic link pointed at.\n> Documentation/RelNotes-1.5.3.2.txt:   - an untracked symbolic link to a directory made it fart;\n\nMany of these release notes are talking about bugs that we fixed\nrelated to switching between revisions where in one revision the\npath was a symlink and in the other revision it was a directory or\na file (or vice-versa).\n\n> Documentation/config.txt:\tIf false, symbolic links are checked out as small plain files that\n> Documentation/config.txt:\tsymbolic links. True by default.\n> Documentation/git-update-index.txt:to 'false' (see gitlink:git-config[1]), symbolic links are checked out\n> Documentation/git-update-index.txt:from symbolic link to regular file.\n> Documentation/technical/racy-git.txt:files vs symbolic links) and executable bits (only for regular\n\nThese are probably what Matt was looking for.\n\n> Documentation/config.txt:\tand other symbolic reference files, use symbolic links.\n> Documentation/config.txt:\texpect HEAD to be a symbolic link.\n> Documentation/core-tutorial.txt:   This is similar to a symbolic link and points at\n> Documentation/git-local-fetch.txt:\tInstead of regular file-to-file copying use symbolic links to the objects\n> Documentation/git-symbolic-ref.txt:In the past, `.git/HEAD` was a symbolic link pointing at\n> Documentation/git-symbolic-ref.txt:advertised (horrors).  Therefore symbolic links are now deprecated\n> Documentation/git-update-ref.txt:these symbolic pointers, whether they are symlinks or these\n> Documentation/git-update-ref.txt:\"regular file symbolic refs\".  It follows *real* symlinks only\n> Documentation/glossary.txt:\treferences are manipulated with the gitlink:git-symbolic-ref[1]\n> Documentation/repository-layout.txt:\ta symbolic link instead of a symref that points at the current\n\nThese are all about how Git stores refs, and how HEAD used to be\na symbolic link but has since changed to a symbolic reference...\nSo less useful to what he was looking for I think.\n\n-- \nShawn.\n"},{"id":"53664","messageId":"70952A932255A2489522275A628B97C3052E993B@xmb-sjc-233.amer.cisco.com","threadId":"9950","inReplyTo":"20070920172736.GU3099@spearce.org","subject":"RE: Symbolic link documentation","fromName":"Matt Seitz (matseitz)","fromEmail":"matseitz@cisco.com","sentAt":"2007-09-20T17:52:07Z","receivedAt":"2007-09-20T17:52:07Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"From: spearce@spearce.org [mailto:spearce@spearce.org] \n> \n> > Documentation/git-update-index.txt:to 'false' (see \n> > gitlink:git-config[1]), symbolic links are checked out \n> Documentation/git-update-index.txt:from symbolic link to regular file.\n> > Documentation/technical/racy-git.txt:files vs symbolic links) and \n> > executable bits (only for regular\n> \n> These are probably what Matt was looking for.\n\nThe git-update-index and git-update-ref manual references are the\nclosest to what I was looking for.  Both are more low-level and\ntechnical than what I was hoping for, and the discussion in\ngit-update-index seems targeted primarily at how symlinks are translated\non file systems that don't support symlinks.\n\nI guess I was looking for something like the GNU \"tar\" documentation of\nhow symlinks are handled\n(http://www.gnu.org/software/tar/manual/html_node/dereference.html#deref\nerence).\n\n--\nMatt Seitz\nManager, File System Virtualization\nCisco Systems, Inc.\n.:|:.:|:.  \n\n\nBEGIN:VCARD\nVERSION:2.1\nN:Seitz;Matt\nFN:Matt Seitz\nORG:Cisco Systems, Inc\nTITLE:Manager\nTEL;WORK;VOICE:408-200-8000\nADR;WORK:;;3975 Freedom Circle, Floor 8;Santa Clara;CA;95054;United States of America\nLABEL;WORK;ENCODING=QUOTED-PRINTABLE:3975 Freedom Circle, Floor 8=0D=0ASanta Clara, CA 95054=0D=0AUnited States o=\nf America\nEMAIL;PREF;INTERNET:matseitz@cisco.com\nREV:20070709T234049Z\nEND:VCARD\n"},{"id":"53662","messageId":"Pine.LNX.4.64.0709201851190.28395@racer.site","threadId":"9950","inReplyTo":"20070920172736.GU3099@spearce.org","subject":"Re: Symbolic link documentation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-09-20T17:52:28Z","receivedAt":"2007-09-20T17:52:28Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 20 Sep 2007, Shawn O. Pearce wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > On Thu, 20 Sep 2007, Matt Seitz (matseitz) wrote:\n> > \n> > > Where does the git user documentation discuss how git handles \n> > > symbolic links?\n> > \n> > $ git grep symbolic Documentation/ | grep link\n> > [...]\n> > Documentation/config.txt:\tIf false, symbolic links are checked out as small plain files that\n> > Documentation/config.txt:\tsymbolic links. True by default.\n> > Documentation/git-update-index.txt:to 'false' (see gitlink:git-config[1]), symbolic links are checked out\n> > Documentation/git-update-index.txt:from symbolic link to regular file.\n> > Documentation/technical/racy-git.txt:files vs symbolic links) and executable bits (only for regular\n> \n> These are probably what Matt was looking for.\n\nWell, he asked where the git user documentation talks about symbolic \nlinks, and I provided a pointer.\n\nCiao,\nDscho\n"},{"id":"53665","messageId":"20070920181100.GV3099@spearce.org","threadId":"9950","inReplyTo":"70952A932255A2489522275A628B97C3052E993B@xmb-sjc-233.amer.cisco.com","subject":"Re: Symbolic link documentation","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-20T18:11:00Z","receivedAt":"2007-09-20T18:11:00Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Matt Seitz (matseitz)\" <matseitz@cisco.com> wrote:\n> The git-update-index and git-update-ref manual references are the\n> closest to what I was looking for.  Both are more low-level and\n> technical than what I was hoping for, and the discussion in\n> git-update-index seems targeted primarily at how symlinks are translated\n> on file systems that don't support symlinks.\n> \n> I guess I was looking for something like the GNU \"tar\" documentation of\n> how symlinks are handled\n> (http://www.gnu.org/software/tar/manual/html_node/dereference.html#deref\n> erence).\n\nGit never dereferences a symlink that are stored as part of the\nrevision data.  The only time we dereference a symlink is when it\nis used inside of .git/refs, or as .git/HEAD, which is what the\ngit-update-ref manpage was talking about.\n\nSo Git handles symlinks in the working tree *without* dereferencing\nthem.  Internally we store the target of the symlink, much as\ntar would store the target of the symlink.  There is no way to\nactivate a dereference behavior (--dereference / -h in GNU tar)\nas typically you want to preseve the symlink as a symlink to the\ntarget; its part of your source code.\n\nMaybe this is a good hint that the user manual should have a section\non symbolic links.  Its obvious to old Git hands that a symlink is\nnothing more than a file with a slightly different mode, but that\nmay not be obvious to people who are new to Git.\n\n-- \nShawn.\n"},{"id":"53667","messageId":"fcufdp$bg7$1@sea.gmane.org","threadId":"9950","inReplyTo":"Pine.LNX.4.64.0709201851190.28395@racer.site","subject":"Re: Symbolic link documentation","fromName":"Matt Seitz","fromEmail":"matseitz@cisco.com","sentAt":"2007-09-20T18:50:57Z","receivedAt":"2007-09-20T18:50:57Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"\"Johannes Schindelin\" <Johannes.Schindelin@gmx.de> wrote in message \nnews:Pine.LNX.4.64.0709201851190.28395@racer.site...\n>\n> Well, he asked where the git user documentation talks about symbolic\n> links, and I provided a pointer.\n\nThanks, I appreciated the pointers. \n"},{"id":"53668","messageId":"70952A932255A2489522275A628B97C3052E99F9@xmb-sjc-233.amer.cisco.com","threadId":"9950","inReplyTo":"20070920181100.GV3099@spearce.org","subject":"RE: Symbolic link documentation","fromName":"Matt Seitz (matseitz)","fromEmail":"matseitz@cisco.com","sentAt":"2007-09-20T19:11:28Z","receivedAt":"2007-09-20T19:11:28Z","isPatch":false,"sender":{"key":"matseitz@cisco.com","avatar":null},"body":"From: spearce@spearce.org [mailto:spearce@spearce.org] \n> \n> So Git handles symlinks in the working tree *without* \n> dereferencing them.  \n\nThanks.  Is there a recommended procedure for tracking changes when the\nsymlink target is outside the working tree?\n\n--\nMatt Seitz\nManager, File System Virtualization\nCisco Systems, Inc.\n.:|:.:|:.\n\n\nBEGIN:VCARD\nVERSION:2.1\nN:Seitz;Matt\nFN:Matt Seitz\nORG:Cisco Systems, Inc\nTITLE:Manager\nTEL;WORK;VOICE:408-200-8000\nADR;WORK:;;3975 Freedom Circle, Floor 8;Santa Clara;CA;95054;United States of America\nLABEL;WORK;ENCODING=QUOTED-PRINTABLE:3975 Freedom Circle, Floor 8=0D=0ASanta Clara, CA 95054=0D=0AUnited States o=\nf America\nEMAIL;PREF;INTERNET:matseitz@cisco.com\nREV:20070709T234049Z\nEND:VCARD\n"},{"id":"53669","messageId":"20070920191651.GW3099@spearce.org","threadId":"9950","inReplyTo":"70952A932255A2489522275A628B97C3052E99F9@xmb-sjc-233.amer.cisco.com","subject":"Re: Symbolic link documentation","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-20T19:16:51Z","receivedAt":"2007-09-20T19:16:51Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Matt Seitz (matseitz)\" <matseitz@cisco.com> wrote:\n> From: spearce@spearce.org [mailto:spearce@spearce.org] \n> > \n> > So Git handles symlinks in the working tree *without* \n> > dereferencing them.  \n> \n> Thanks.  Is there a recommended procedure for tracking changes when the\n> symlink target is outside the working tree?\n\nMove the link target so its inside the working tree?\n\nGit won't step outside of the working tree to look for or to record\nchanges.  Its outside.  We don't track things outside of the part\nof the world you've asked us to track.\n\n-- \nShawn.\n"}]}