{"thread":{"id":"2437","subject":"Getting rid of symlinks in .git?","startedAt":"2005-11-10T20:45:43Z","lastAt":"2005-11-15T07:13:14Z","messageCount":13,"participants":["Petr Baudis","Simon Richter","Alex Riesen","Johannes Schindelin","Nick Hengeveld","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11515","messageId":"20051110204543.GZ30496@pasky.or.cz","threadId":"2437","inReplyTo":null,"subject":"Getting rid of symlinks in .git?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-10T20:45:43Z","receivedAt":"2005-11-10T20:45:43Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"I'm deliberately breaking up the thread here, not to make the list\nreading even more difficult for all the poor readers not so interested\nin electronic archaeology (but I feel better after I began taking my\nnew meds, I can even resist this huge urge to start replying to mails\nfrom June).\n\nIn-Reply-To: <1131653507.11283.31.camel@dv>\n7261 N T Nov 10 Pavel Roskin    ( 1.8K)\n\tRe: [PATCH] cg-pull to stop treating \"master\" specially,\n\tfix fetch_local for .git/HEAD\n(deliberately quoted in entirety)\n\nDear diary, on Thu, Nov 10, 2005 at 09:11:47PM CET, I got a letter\nwhere Pavel Roskin <proski@gnu.org> said that...\n> On Thu, 2005-11-10 at 20:24 +0100, Petr Baudis wrote:\n> >   can you still remember why did you introduce this? In GNU cp\n> > documentation, I can see just\n> > \n> >        -b, --backup\n> >               Make backups of files that are about to be overwritten or removed.\n> > \n> > which doesn't make sense to me - -L dereferences symlinks.\n> \n> You are right, it must be my error.  Anyway, it was so long ago that I\n> would need to review and retest it.\n\nIs it correct that all there is to it is to check if cloning locally\nworks properly with symlinked HEAD in the remote repository?\n\n> While at that, let's stop using symlinks.  git doesn't use symlinks on\n> Cygwin.  I think git should use that code on all OSes, since the\n> benefits of using symlinks are minimal (I think the only benefits are\n> their atomicity and resolving the reference in the kernel rather than in\n> userspace).  Having more uniform code for all platforms would simplify\n> development and testing.  It could also reduce requirements for the\n> transport protocols.  Finally, symlinks could be still used by the users\n> (if they know what they are doing) - git and cogito would simply become\n> symlink agnostic.\n> \n> When files are copied around, symlinks are pain to deal with.  They\n> require special handling to be preserved both for remote operation and\n> dereferenced for local operation (that's what my patch was intended to\n> do).  I'm not even considering what would happen when cloning from Linux\n> to Windows or vice versa.\n\nI personally would not mind getting rid of symlinks completely, but we\nwill still have to support them for some reasonable time period (several\nmajor releases, as far as Cogito is concerned - actually, there is\nplenty of people still using 0.13 and such).\n\nIf more people think this is good idea, I could even again introduce\nsome compatibility code to cg-Xlib which will rewrite symlinkish HEAD\nwhen it hits it (the kind of stuff we did in the old times).\n\n> Sure, it can wait until git 1.0, but it would be great to keep this goal\n> in mind.\n> \n> Disclaimer - I'm not reading the git mailing list, so if it was\n> discussed, I'm sorry, I don't intend to restart that discussion - just\n> give me the pointer and I'll read it.\n\nI didn't notice such a discussion yet.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11567","messageId":"43746118.30404@hogyros.de","threadId":"2437","inReplyTo":"20051110204543.GZ30496@pasky.or.cz","subject":"Re: Getting rid of symlinks in .git?","fromName":"Simon Richter","fromEmail":"simon.richter@hogyros.de","sentAt":"2005-11-11T09:15:04Z","receivedAt":"2005-11-11T09:15:04Z","isPatch":false,"sender":{"key":"simon.richter@hogyros.de","avatar":"https://gravatar.com/avatar/1192aa9fa5dd19ce258b12b044cc27111dd7cdb58d920dc2123a02a24f55b5c5?d=mp&s=160"},"body":"Hello,\n\nPetr Baudis wrote:\n\n> I personally would not mind getting rid of symlinks completely, but we\n> will still have to support them for some reasonable time period (several\n> major releases, as far as Cogito is concerned - actually, there is\n> plenty of people still using 0.13 and such).\n\nAs someone who carries around git repositories on VFAT formatted USB \nsticks, I welcome our symlink-deprived overlords.\n\n    Simon\n"},{"id":"11583","messageId":"81b0412b0511110443x48415032k8ca40d999071e8a9@mail.gmail.com","threadId":"2437","inReplyTo":"43746118.30404@hogyros.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2005-11-11T12:43:18Z","receivedAt":"2005-11-11T12:43:18Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 11/11/05, Simon Richter <Simon.Richter@hogyros.de> wrote:\n> > I personally would not mind getting rid of symlinks completely, but we\n> > will still have to support them for some reasonable time period (several\n> > major releases, as far as Cogito is concerned - actually, there is\n> > plenty of people still using 0.13 and such).\n>\n> As someone who carries around git repositories on VFAT formatted USB\n> sticks, I welcome our symlink-deprived overlords.\n>\n\nBut you shouldn't care if you have reasonably recent git everywhere:\nsymlinks and their absence already handled: .git/config created by\ninit-db contains the configuration parameter for filemode, which\ndecides whether it is safe to use the symlinks on the underlying\nfilesystem.\nIt looks more like a rhetorical question of code cleanup, because\nin-file symlinks already handle all possible cases.\n"},{"id":"11584","messageId":"20051111130100.GR30496@pasky.or.cz","threadId":"2437","inReplyTo":"81b0412b0511110443x48415032k8ca40d999071e8a9@mail.gmail.com","subject":"Re: Getting rid of symlinks in .git?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-11T13:01:00Z","receivedAt":"2005-11-11T13:01:00Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Nov 11, 2005 at 01:43:18PM CET, I got a letter\nwhere Alex Riesen <raa.lkml@gmail.com> said that...\n> It looks more like a rhetorical question of code cleanup, because\n> in-file symlinks already handle all possible cases.\n\nAnother example recently mentioned is detecting current branch over\nHTTP, where you can't see where the HEAD's symlink heads to.\n\nActually, cg-fetch wouldn't handle the 'ref:' head properly. Just fixed\nthat.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11586","messageId":"Pine.LNX.4.63.0511111511050.7575@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2437","inReplyTo":"43746118.30404@hogyros.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-11T14:14:24Z","receivedAt":"2005-11-11T14:14:24Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Nov 2005, Simon Richter wrote:\n\n> As someone who carries around git repositories on VFAT formatted USB \n> sticks, I welcome our symlink-deprived overlords.\n\nPlease note that symlinks are much more performant than symrefs. Working a \nlot with switching branches, this matters.\n\nAnd -- as has been mentioned elsewhere -- it is no longer a problem to \nwork on filesystems which don't support symlinks using a platform which \ndoes.\n\nHth,\nDscho\n"},{"id":"11594","messageId":"20051111150530.GT30496@pasky.or.cz","threadId":"2437","inReplyTo":"Pine.LNX.4.63.0511111511050.7575@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-11T15:05:30Z","receivedAt":"2005-11-11T15:05:30Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hello,\n\nDear diary, on Fri, Nov 11, 2005 at 03:14:24PM CET, I got a letter\nwhere Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> On Fri, 11 Nov 2005, Simon Richter wrote:\n> \n> > As someone who carries around git repositories on VFAT formatted USB \n> > sticks, I welcome our symlink-deprived overlords.\n> \n> Please note that symlinks are much more performant than symrefs. Working a \n> lot with switching branches, this matters.\n\n  this is interesting. What operations get slowed down noticeably in\nparticular? Do you have any timing testcases and data at hand?\n\n  Thanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11599","messageId":"Pine.LNX.4.63.0511111636400.16210@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2437","inReplyTo":"20051111150530.GT30496@pasky.or.cz","subject":"Re: Getting rid of symlinks in .git?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-11T15:40:43Z","receivedAt":"2005-11-11T15:40:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Nov 2005, Petr Baudis wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> > \n> > Please note that symlinks are much more performant than symrefs. Working a \n> > lot with switching branches, this matters.\n> \n> What operations get slowed down noticeably in particular?\n\nWell, if you have to read two files instead of one, it is 100% slower ;-)\n\n> Do you have any timing testcases and data at hand?\n\nNo and no.\n\nNote that the only symlink/symref you usually have is .git/HEAD. But it \nfeels wrong to take the worse approach in *all* cases, just because \n*one* brain-fscked file system/operating system does not support the \nsuperior approach.\n\nConclusion: I can live with the symref support in git \"AS IS\".\n\nCiao,\nDscho\n"},{"id":"11600","messageId":"20051111154938.GU30496@pasky.or.cz","threadId":"2437","inReplyTo":"Pine.LNX.4.63.0511111636400.16210@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-11T15:49:38Z","receivedAt":"2005-11-11T15:49:38Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Nov 11, 2005 at 04:40:43PM CET, I got a letter\nwhere Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> On Fri, 11 Nov 2005, Petr Baudis wrote:\n> \n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> > > \n> > > Please note that symlinks are much more performant than symrefs. Working a \n> > > lot with switching branches, this matters.\n> > \n> > What operations get slowed down noticeably in particular?\n> \n> Well, if you have to read two files instead of one, it is 100% slower ;-)\n\nBut you usually don't read the HEAD that often...\n\nBesides, the kernel has to read the symlink file as well in order to\nfollow the symlink. ;-)\n\n> Note that the only symlink/symref you usually have is .git/HEAD. But it \n> feels wrong to take the worse approach in *all* cases, just because \n> *one* brain-fscked file system/operating system does not support the \n> superior approach.\n\nThis is about being consistent, and also to support dumber protocols\nbetter.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11601","messageId":"20051111155525.GD4051@reactrix.com","threadId":"2437","inReplyTo":"Pine.LNX.4.63.0511111636400.16210@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2005-11-11T15:55:26Z","receivedAt":"2005-11-11T15:55:26Z","isPatch":false,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"On Fri, Nov 11, 2005 at 04:40:43PM +0100, Johannes Schindelin wrote:\n\n> Note that the only symlink/symref you usually have is .git/HEAD. But it \n> feels wrong to take the worse approach in *all* cases, just because \n> *one* brain-fscked file system/operating system does not support the \n> superior approach.\n\nSymlinks at the other end of an HTTP transport are also similarly\nbrain-challenged.\n\n-- \nFor a successful technology, reality must take precedence over public\nrelations, for nature cannot be fooled.\n"},{"id":"11602","messageId":"Pine.LNX.4.63.0511111703001.16340@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2437","inReplyTo":"20051111154938.GU30496@pasky.or.cz","subject":"Re: Getting rid of symlinks in .git?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-11T16:03:29Z","receivedAt":"2005-11-11T16:03:29Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 11 Nov 2005, Petr Baudis wrote:\n\n> This is about being consistent, and also to support dumber protocols\n> better.\n\nFor my local development, I couldn't care less about dumber protocols.\n\nHth,\nDscho\n"},{"id":"11617","messageId":"20051111184202.GA13524@steel.home","threadId":"2437","inReplyTo":"437494B2.30309@hogyros.de","subject":"Re: Getting rid of symlinks in .git?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2005-11-11T18:42:02Z","receivedAt":"2005-11-11T18:42:02Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Simon Richter, Fri, Nov 11, 2005 13:55:14 +0100:\n> >But you shouldn't care if you have reasonably recent git everywhere:\n> >symlinks and their absence already handled:\n> \n> Well, I don't have working directories on USB sticks, so I don't \n> actually use the symlinks, would they be there, but I'm definitely \n> annoyed by not being able to copy a .git directory from some project \n> over and be done with it.\n> \n\nReasonable, perhaps. But are the git-pull and -clone _that_ slow or\nawkward? Besides, you'd probably end up copying more than you'd want.\n\nThat's interesting case, btw. I'm restoring git mailing list in cc, so\nit gets a bit wider of auditorium.\n"},{"id":"11863","messageId":"7vhdaevedu.fsf@assigned-by-dhcp.cox.net","threadId":"2437","inReplyTo":"81b0412b0511110443x48415032k8ca40d999071e8a9@mail.gmail.com","subject":"Re: Getting rid of symlinks in .git?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-15T02:22:37Z","receivedAt":"2005-11-15T02:22:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> But you shouldn't care if you have reasonably recent git everywhere:\n> symlinks and their absence already handled: .git/config created by\n> init-db contains the configuration parameter for filemode, which\n> decides whether it is safe to use the symlinks on the underlying\n> filesystem.\n\nNo, no no nononononono....\n\ncore.filemode is whether the executable bit is trustworthy and\ndoes not have anything to do with symlinked heads, although\nthese two happen to become problematic on VFAT.\n\nCurrently we have USE_SYMLINK_HEAD and have failing symlink()\ncall fall back on regular file symrefs.\n\nBut this may not matter as long as nobody would want to force\nregular file symrefs on a filesystem that is capable of doing a\nsymlink.  That is the only thing we cannot do right now.\n"},{"id":"11871","messageId":"81b0412b0511142313r9635121wb4fdfe12c3ec35fe@mail.gmail.com","threadId":"2437","inReplyTo":"7vhdaevedu.fsf@assigned-by-dhcp.cox.net","subject":"Re: Getting rid of symlinks in .git?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2005-11-15T07:13:14Z","receivedAt":"2005-11-15T07:13:14Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 11/15/05, Junio C Hamano <junkio@cox.net> wrote:\n> > But you shouldn't care if you have reasonably recent git everywhere:\n> > symlinks and their absence already handled: .git/config created by\n> > init-db contains the configuration parameter for filemode, which\n> > decides whether it is safe to use the symlinks on the underlying\n> > filesystem.\n>\n> No, no no nononononono....\n>\n> core.filemode is whether the executable bit is trustworthy and\n> does not have anything to do with symlinked heads, although\n> these two happen to become problematic on VFAT.\n\nOf course! Silly me...\n"}]}