{"thread":{"id":"12290","subject":"[Q] Tell Git to follow symlinks?","startedAt":"2008-02-24T11:05:36Z","lastAt":"2008-02-25T10:06:28Z","messageCount":6,"participants":["Alexander Gladysh","Remi Vanicat","David Tweed","Jakub Narebski","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69782","messageId":"c6c947f60802240305w40a7af96yc47f90e573384c04@mail.gmail.com","threadId":"12290","inReplyTo":null,"subject":"[Q] Tell Git to follow symlinks?","fromName":"Alexander Gladysh","fromEmail":"agladysh@gmail.com","sentAt":"2008-02-24T11:05:36Z","receivedAt":"2008-02-24T11:05:36Z","isPatch":false,"sender":{"key":"agladysh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38239?v=4"},"body":"Hi, list!\n\nSorry for a rather dumb question.\n\nI'm trying to build a rudimentary GIT-based backup system for my remote host.\n\nI want to put all relevant data (which is scattered throught the\nsystem) under single large Git backup-only (i.e. no development)\nrepository.\n\nAnd then on the remote system set cron to do something like\n\n    git add . && git commit -m \"`date`\" && git gc\n\nAnd on local system set cron to do git pull.\n\nI thought to construct my repo of the number of symlinks to other\nplaces, but apparently Git does not follow any simlinks.\n\nI have considered using zillion of git submodules, but looks like this\nsolution would demand more work than I'd like to put in there.\n\nPlease give me some directions on the building such dumb backup system I want :)\n\nThanks in advance,\nAlexander.\n"},{"id":"69795","messageId":"87zltq2xzn.dlv@maison.homelinux.org","threadId":"12290","inReplyTo":"c6c947f60802240305w40a7af96yc47f90e573384c04@mail.gmail.com","subject":"Re: [Q] Tell Git to follow symlinks?","fromName":"Remi Vanicat","fromEmail":"vanicat@debian.org","sentAt":"2008-02-24T15:08:28Z","receivedAt":"2008-02-24T15:08:28Z","isPatch":false,"sender":{"key":"vanicat@debian.org","avatar":"https://gravatar.com/avatar/cd491a7f4c221349809a60f88fc21326b97cce2a705e318898aa74851db92409?d=mp&s=160"},"body":"\"Alexander Gladysh\" <agladysh@gmail.com> writes:\n\n> I thought to construct my repo of the number of symlinks to other\n> places, but apparently Git does not follow any simlinks.\n\nHope so, I use this feature, for example to manage my debian\nalternatives. \n\n> Please give me some directions on the building such dumb backup\n> system I want :)\n\nI use \"reverse\" symlinks: the files i want to manage are replaced by\nsymlink to the file that is in then git repository:\n\nmy home contain:\n\n.abbrev_defs -> .myconfig/abbrev_defs\n.bash_logout -> .myconfig/bash_logout\n.bash_profile -> .myconfig/bash_profile\n.bashrc -> .myconfig/bashrc\n.custom -> .myconfig/custom\n.dircolors -> .myconfig/dircolors\n.emacs -> .myconfig/emacs\n.gnomerc -> .myconfig/gnomerc\n.gnus -> .myconfig/gnus\n.irssi -> .myconfig/irssi/\n.profile -> .myconfig/profile\n.ScrollZ -> .myconfig/ScrollZ/\n.scrollzrc -> .myconfig/scrollzrc\n.xchat2 -> .myconfig/xchat2/\n\nand a .myconfig git repository that manage those file.\n\n-- \nRémi Vanicat\n"},{"id":"69809","messageId":"c6c947f60802241022l53ef344es10e23e1cf9b7116a@mail.gmail.com","threadId":"12290","inReplyTo":"87zltq2xzn.dlv@maison.homelinux.org","subject":"Re: [Q] Tell Git to follow symlinks?","fromName":"Alexander Gladysh","fromEmail":"agladysh@gmail.com","sentAt":"2008-02-24T18:22:49Z","receivedAt":"2008-02-24T18:22:49Z","isPatch":false,"sender":{"key":"agladysh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38239?v=4"},"body":"On Sun, Feb 24, 2008 at 6:08 PM, Remi Vanicat <vanicat@debian.org> wrote:\n\n>  > I thought to construct my repo of the number of symlinks to other\n>  > places, but apparently Git does not follow any simlinks.\n>\n>  Hope so, I use this feature, for example to manage my debian\n>  alternatives.\n\nI do not advocate removal of this useful feature, but may be there are\nsome arcane switch or even a simple source hack that would help me in\nmy specific case, :)\n\n>  > Please give me some directions on the building such dumb backup\n>  > system I want :)\n>\n>  I use \"reverse\" symlinks: the files i want to manage are replaced by\n>  symlink to the file that is in then git repository:\n> <...>\n\nYes, this is an option, thank you. But it would involve altering\nexisting software configurations (like enabling FollowSymLinks in\nApache etc.) -- which I would like to avoid if possible.\n\nThank you,\nAlexander.\n"},{"id":"69849","messageId":"e1dab3980802242154h721bd8a5x60b7f73d9fc3a2ef@mail.gmail.com","threadId":"12290","inReplyTo":"87zltq2xzn.dlv@maison.homelinux.org","subject":"Re: [Q] Tell Git to follow symlinks?","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2008-02-25T05:54:55Z","receivedAt":"2008-02-25T05:54:55Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"On Sun, Feb 24, 2008 at 3:08 PM, Remi Vanicat <vanicat@debian.org> wrote:\n> \"Alexander Gladysh\" <agladysh@gmail.com> writes:\n>\n>  > I thought to construct my repo of the number of symlinks to other\n>  > places, but apparently Git does not follow any simlinks.\n>\n>  I use \"reverse\" symlinks: the files i want to manage are replaced by\n>  symlink to the file that is in then git repository:\n>\n>  my home contain:\n>\n>  .abbrev_defs -> .myconfig/abbrev_defs\n>  .bash_logout -> .myconfig/bash_logout\n[...]\n>\n>  and a .myconfig git repository that manage those file.\n\nFor configuration files I tend to actually physically copy them to a\ndirectory under the tree that I'm archiving using git, just because it\nfeels slightly safer. If something git related goes wrong (probably\ndue to my input) it can't, eg, stick an old, corrupted version of, eg,\n.bashrc in my home directory, which stops terminal login when I next\nreboot. (I had something similar happen when I actually had the live\nversion of my archiving script being put into the archive. When I\nchecked out a previous tree to look at something, an old buggy\narchiving script got checked out and created half a dozen corrupt\ncommits I had to reset away.) Of course, the odds of anything like\nthis happening in practice are quite small.\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\n\"while having code so boring anyone can maintain it, use Python.\" --\nattempted insult seen on slashdot\n"},{"id":"69873","messageId":"m3k5ktbep1.fsf@localhost.localdomain","threadId":"12290","inReplyTo":"c6c947f60802240305w40a7af96yc47f90e573384c04@mail.gmail.com","subject":"Re: [Q] Tell Git to follow symlinks?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-25T08:52:48Z","receivedAt":"2008-02-25T08:52:48Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Alexander Gladysh\" <agladysh@gmail.com> writes:\n\n> I thought to construct my repo of the number of symlinks to other\n> places, but apparently Git does not follow any symlinks.\n\nGit stores symlinks as symlinks. Changing that (adding for example\ncore.followSymlinks) would require quite a bit of surgery.\n\nYou can alternatively try to work with GIT_DIR, or/and with\nexplicitely specifying worktree (and working from within repo), and/or\nsymlinking .git.\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"69877","messageId":"vpqtzjxbba3.fsf@bauges.imag.fr","threadId":"12290","inReplyTo":"m3k5ktbep1.fsf@localhost.localdomain","subject":"Re: [Q] Tell Git to follow symlinks?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-02-25T10:06:28Z","receivedAt":"2008-02-25T10:06:28Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> \"Alexander Gladysh\" <agladysh@gmail.com> writes:\n>\n>> I thought to construct my repo of the number of symlinks to other\n>> places, but apparently Git does not follow any symlinks.\n>\n> Git stores symlinks as symlinks. Changing that (adding for example\n> core.followSymlinks) would require quite a bit of surgery.\n\nIn particular, this would raise the question of what to do when\nwritting to a symlink. Following symlinks when doing a checkout or a\nmerge could mean to allow git to write outside its working tree, which\nis problematic security-wise.\n\n-- \nMatthieu\n"}]}