{"thread":{"id":"9714","subject":"[RFC] Change handling of RelNotes","startedAt":"2007-08-31T01:35:36Z","lastAt":"2007-08-31T20:25:46Z","messageCount":12,"participants":["Stephen Cuppett","Petr Baudis","Junio C Hamano","Marius Storm-Olsen","Nanako Shiraishi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"51971","messageId":"316a20a40708301835hc4236d4tdb289b6f705ab86@mail.gmail.com","threadId":"9714","inReplyTo":null,"subject":"[RFC] Change handling of RelNotes","fromName":"Stephen Cuppett","fromEmail":"cuppett@gmail.com","sentAt":"2007-08-31T01:35:36Z","receivedAt":"2007-08-31T01:35:36Z","isPatch":false,"sender":{"key":"cuppett@gmail.com","avatar":null},"body":"I went to clone git onto a memory stick today.  The default fs on the\nsticks doesn't support symlinks.  After looking a little bit, the only\nsymlink I can see in the source tree is RelNotes.  It appears when\ngoing to a new release the file gets created in /Documentation and the\nsymlink updated.\n\nI propose we eliminate this symlink.  There are multiple other things\nwe can do to eliminate it and make the repository more flexible across\nfilesystems:\n\n * Always have current release in /Documentation/RelNotes and keep the\nprior versions named the way they are maintained now.  When starting a\nnew release, rename the file and create it again.\n * Keep the current in RelNotes and leave the archived ones in\n/Documentation.  Doing same content move and clear operation when\nstarting a new release.\n * Keep two copies RelNotes and /Documentation/RelNotes-X.X.X that\nessentially have same content and RelNotes has a lot of churn\n * others...?\n\nWith this one abnormality the git repo on a normal flash drive doesn't\nwork... at least in my case.\n"},{"id":"51973","messageId":"20070831013935.GM1219@pasky.or.cz","threadId":"9714","inReplyTo":"316a20a40708301835hc4236d4tdb289b6f705ab86@mail.gmail.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2007-08-31T01:39:35Z","receivedAt":"2007-08-31T01:39:35Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Fri, Aug 31, 2007 at 03:35:36AM CEST, Stephen Cuppett wrote:\n> With this one abnormality the git repo on a normal flash drive doesn't\n> work... at least in my case.\n\nWouldn't it be better to minimalize the restriction imposed to you by\ngit in case you are working on a filesystem that doesn't support\nsymlinks? Let's say that in that case Git will keep the symlink only in\nthe index... (And perhaps warn.)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nEarly to rise and early to bed makes a male healthy and wealthy and dead.\n                -- James Thurber\n"},{"id":"51977","messageId":"7vejhk5tr0.fsf@gitster.siamese.dyndns.org","threadId":"9714","inReplyTo":"316a20a40708301835hc4236d4tdb289b6f705ab86@mail.gmail.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-31T02:21:23Z","receivedAt":"2007-08-31T02:21:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Stephen Cuppett\" <cuppett@gmail.com> writes:\n\n> I went to clone git onto a memory stick today.  The default fs on the\n> sticks doesn't support symlinks.  After looking a little bit, the only\n> symlink I can see in the source tree is RelNotes.  It appears when\n> going to a new release the file gets created in /Documentation and the\n> symlink updated.\n\nWell, I hope you do not compile nor checkout git onto a memory\nstick but use it as just a sneakernet medium.\n\nIf that is the case why should it matter if the contents tracked\nhas symlinks?\n"},{"id":"51989","messageId":"7v642w44uy.fsf@gitster.siamese.dyndns.org","threadId":"9714","inReplyTo":"20070831013935.GM1219@pasky.or.cz","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-31T06:04:21Z","receivedAt":"2007-08-31T06:04:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> On Fri, Aug 31, 2007 at 03:35:36AM CEST, Stephen Cuppett wrote:\n>> With this one abnormality the git repo on a normal flash drive doesn't\n>> work... at least in my case.\n>\n> Wouldn't it be better to minimalize the restriction imposed to you by\n> git in case you are working on a filesystem that doesn't support\n> symlinks? Let's say that in that case Git will keep the symlink only in\n> the index... (And perhaps warn.)\n\nDidn't we already add support for Cygwin/MinGW in the form of\ncore.symlinks configuration item?\n\nI just did this:\n\n\t$ git clone -l -s -n git.git victim-005\n        $ cd victim-005\n        $ git config core.symlinks false\n        $ git checkout\n"},{"id":"51990","messageId":"46D7B042.7010807@trolltech.com","threadId":"9714","inReplyTo":"7vejhk5tr0.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2007-08-31T06:08:02Z","receivedAt":"2007-08-31T06:08:02Z","isPatch":false,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Junio C Hamano said the following on 31.08.2007 04:21:\n> \"Stephen Cuppett\" <cuppett@gmail.com> writes:\n>> I went to clone git onto a memory stick today.  The default fs on\n>> the sticks doesn't support symlinks.  After looking a little bit,\n>> the only symlink I can see in the source tree is RelNotes.  It\n>> appears when going to a new release the file gets created in\n>> /Documentation and the symlink updated.\n> \n> Well, I hope you do not compile nor checkout git onto a memory \n> stick but use it as just a sneakernet medium.\n> \n> If that is the case why should it matter if the contents tracked \n> has symlinks?\n\nWell, you have the same thing on Windows, of course. Where the first \ntime you try to clone git.git, it reports the RelNotes symlink.\nSo, at first you think, \"Hmm, that just seems broken\"; till you \ndiscover core.symlinks=false, and set that globally, and every thing \nworks.\n\nSo, as a Windows user you always have that option set to false; but \nyou have to discover it first. I can see it being a problem on Linux, \nmounting a memorystick, and then trying to clone git.git to it. Your \ninclination to discover core.symlinks=false is not as high, I guess. \nAnd since it's certainly nothing you'd want in your global config, it \nmight take some time before you realize that the correct way of \ncloning it for a memorystick is in fact:\n     git clone -n git://repo.or.cz/git.git\n\n(and if you'd want it checked out too)\n     cd git\n     git config core.symlinks false\n     git checkout\n\n\nMaybe we should consider having Git detect the underlying FS's \ncapabilities when cloning, and set core.symlinks to the correct value? \n(You'll have to manually adjust it if you just 'cp' it to another FS, \nthat's as expected.)\n\n^shrug^\n\n-- \n.marius\n\n"},{"id":"51993","messageId":"200708310645.l7V6jKJk009287@mi0.bluebottle.com","threadId":"9714","inReplyTo":"316a20a40708301835hc4236d4tdb289b6f705ab86@mail.gmail.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Nanako Shiraishi","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-08-31T06:44:58Z","receivedAt":"2007-08-31T06:44:58Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting \"Stephen Cuppett\" <cuppett@gmail.com>:\n\n> I propose we eliminate this symlink.\n\nMaybe it is just me, but you do not sound like you are proposing to do\nanything yourself.  You are simply demanding Junio to change the way he\nworks.  Instead of being able to edit RelNotes at the toplevel, relying\non the symbolic link to let him edit the right file, you are forcing him\nto edit the appropriate file in Documentation/ directory.\n\nShouldn't you have at least said \"I request\" instead?\n\nI sometimes have a checkout on a filesystem that does not support\nsymbolic links, but I set core.symlink configuration variable to false\nin such a case.  Would it make sense to update \"git init\" to autodetect\nlack of symbolic link support in the filesystem?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nFree pop3 email with a spam filter.\nhttp://www.bluebottle.com/tag/5\n"},{"id":"51994","messageId":"7vveaw2na9.fsf@gitster.siamese.dyndns.org","threadId":"9714","inReplyTo":"200708310645.l7V6jKJk009287@mi0.bluebottle.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-31T07:09:18Z","receivedAt":"2007-08-31T07:09:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@bluebottle.com> writes:\n\n> I sometimes have a checkout on a filesystem that does not support\n> symbolic links, but I set core.symlink configuration variable to false\n> in such a case.  Would it make sense to update \"git init\" to autodetect\n> lack of symbolic link support in the filesystem?\n\nHmph.  Something along this line, perhaps?\n\n builtin-init-db.c |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex af15cb2..c411008 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -264,6 +264,22 @@ static int create_default_files(const char *git_dir, const char *template_path)\n \t\tif (work_tree != git_work_tree_cfg)\n \t\t\tgit_config_set(\"core.worktree\", work_tree);\n \t}\n+\n+\t/* Check if symlink is supported in the work tree */\n+\tif (!reinit) {\n+\t\tpath[len] = 0;\n+\t\tstrcpy(path + len, \"tXXXXXX\");\n+\t\t\n+\t\tif (!close(xmkstemp(path)) &&\n+\t\t    !unlink(path) &&\n+\t\t    !symlink(\"testing\", path) &&\n+\t\t    !lstat(path, &st1) &&\n+\t\t    S_ISLNK(st1.st_mode))\n+\t\t\t; /* good */\n+\t\telse\n+\t\t\tgit_config_set(\"core.symlinks\", \"false\");\n+\t}\n+\n \treturn reinit;\n }\n \n"},{"id":"51995","messageId":"7vodgo2moe.fsf_-_@gitster.siamese.dyndns.org","threadId":"9714","inReplyTo":"7vveaw2na9.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] autodetect core.symlinks in git-init","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-31T07:22:25Z","receivedAt":"2007-08-31T07:22:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"We already autodetect if filemode is reliable on the filesystem\nto deal with VFAT and friends.  Do the same for symbolic link\nsupport.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * The earlier one left the test symlink behind after testing is\n   complete.  Embarrassing...\n\n builtin-init-db.c |   15 +++++++++++++++\n 1 files changed, 15 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex af15cb2..763fa55 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -264,6 +264,21 @@ static int create_default_files(const char *git_dir, const char *template_path)\n \t\tif (work_tree != git_work_tree_cfg)\n \t\t\tgit_config_set(\"core.worktree\", work_tree);\n \t}\n+\n+\t/* Check if symlink is supported in the work tree */\n+\tif (!reinit) {\n+\t\tpath[len] = 0;\n+\t\tstrcpy(path + len, \"tXXXXXX\");\n+\t\tif (!close(xmkstemp(path)) &&\n+\t\t    !unlink(path) &&\n+\t\t    !symlink(\"testing\", path) &&\n+\t\t    !lstat(path, &st1) &&\n+\t\t    S_ISLNK(st1.st_mode))\n+\t\t\tunlink(path); /* good */\n+\t\telse\n+\t\t\tgit_config_set(\"core.symlinks\", \"false\");\n+\t}\n+\n \treturn reinit;\n }\n \n"},{"id":"51998","messageId":"200708310800.l7V80k7L005962@mi1.bluebottle.com","threadId":"9714","inReplyTo":"7vodgo2moe.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] autodetect core.symlinks in git-init","fromName":"Nanako Shiraishi","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-08-31T08:00:37Z","receivedAt":"2007-08-31T08:00:37Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com>:\n\n> We already autodetect if filemode is reliable on the filesystem\n> to deal with VFAT and friends.  Do the same for symbolic link\n> support.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>\n>  * The earlier one left the test symlink behind after testing is\n>    complete.  Embarrassing...\n>\n>  builtin-init-db.c |   15 +++++++++++++++\n>  1 files changed, 15 insertions(+), 0 deletions(-)\n\nThank you for a quick patch.  I was about to report that leftover test\nfile as a bug.  Do you ever sleep?  I am always amazed how quickly any\npotential issue raised on the mailing list is resolved.\n\nWith this patch my \"git init\" in a pendrive correctly says \"[core]\nsymlinks = false\".\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nGet a free email account with anti spam protection.\nhttp://www.bluebottle.com/tag/2\n"},{"id":"52002","messageId":"46D7CFE5.9040508@trolltech.com","threadId":"9714","inReplyTo":"7vodgo2moe.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] autodetect core.symlinks in git-init","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2007-08-31T08:23:01Z","receivedAt":"2007-08-31T08:23:01Z","isPatch":true,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Junio C Hamano said the following on 31.08.2007 09:22:\n> We already autodetect if filemode is reliable on the filesystem\n> to deal with VFAT and friends.  Do the same for symbolic link\n> support.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n> +\t\tif (!close(xmkstemp(path)) &&\n\nJust tried this with 4msysgit (so, MinGW on Windows), and with a patch \nfor adding xmkstemp() to git-compat-util.h, this patch works perfectly \non Windows. It's obviously the right thing to do.\n\nAcked-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>\n\n-- \n.marius\n\n"},{"id":"52037","messageId":"316a20a40708310552r3d445d03h2ab44508a0608f0c@mail.gmail.com","threadId":"9714","inReplyTo":"316a20a40708310539w1d20c391w8566a042c7a8679a@mail.gmail.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Stephen Cuppett","fromEmail":"cuppett@gmail.com","sentAt":"2007-08-31T12:52:38Z","receivedAt":"2007-08-31T12:52:38Z","isPatch":false,"sender":{"key":"cuppett@gmail.com","avatar":null},"body":"Sorry, I didn't mean to imply a demand on anybody, or mandate anybody\nchange their workflow if really awkward or inconvenient.  Just new to\ngit and was trying some things and noticed this oddity.  In software\ntest, so I typically file reports for usability nits as well as big\nthings, and never expect to fix them myself.  Used to my\n\"recommendations\" getting rejected too.  ;)\n\nJust trying to lower a barrier to entry in a weird case....\n\nI tested out the patch on Linux with a regular filesystem and with a\nmemory stick.  It picked it up and did the right thing with RelNotes\nin both cases, leaving the symlink alone on ext3 and changing it to a\nregular file on the memory stick.\n\nI tried compiling it on Windows (cygwin), but ended up with:\n\n/home/stcupp/git/builtin-init-db.c:305: undefined reference to `_xmkstemp'\n\nI tried including git-compat-util.h and some other things to resolve\nit, but was unable with my limited knowledge of their toolchain.\n"},{"id":"52073","messageId":"7vhcmfzc1h.fsf@gitster.siamese.dyndns.org","threadId":"9714","inReplyTo":"316a20a40708310552r3d445d03h2ab44508a0608f0c@mail.gmail.com","subject":"Re: [RFC] Change handling of RelNotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-31T20:25:46Z","receivedAt":"2007-08-31T20:25:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Stephen Cuppett\" <cuppett@gmail.com> writes:\n\n> Sorry, I didn't mean to imply a demand on anybody, or mandate anybody\n> change their workflow...\n\nI have to admit that your \"I propose\" phrase did raise my\neyebrow, but it's not a big deal.  I've grown thicker skins ;-)\n\nAs a general principle, I agree it is a good idea to keep\ngit.git easily accessible by people on different platforms and\nenvironments.  After all, you would need to get git.git in order\nto obtain newer repository features, so there is a chicken and\negg problem involved that is more severe than other projects.\n\nThat is exactly the reason why I do not use subprojects to bind\ngitk and git-gui into git.git.  It needs to wait until everybody\nhas 1.5.2 or newer --- otherwise peole cannot clone or fetch\nfrom git.git to get the feature that allows such a fetch to\nbegin with.\n\nIt would have been a different issue if the build procedure\ndepended on having a tracked symlink foo.h pointing at cache.h\nand some source file included foo.h.  You cannot build such a\nthing on a filesystem without symbolic links.  But the RelNotes\nsymlink is there for people to easily find the notes for the\nlatest to be released, and that symlink appears as a text file\nthat records the name of the Documentation file in a checkout\nwith \"core.symlinks = false\"; I do not think it is such a big\nshow stopper, even for people on a filesystem without symbolic\nlinks.\n"}]}