{"thread":{"id":"8878","subject":"[PATCH] git init: activate rerere by default","startedAt":"2007-07-05T12:16:02Z","lastAt":"2007-07-06T12:03:37Z","messageCount":11,"participants":["Johannes Schindelin","Alex Riesen","Junio C Hamano","しらいしななこ"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46544","messageId":"Pine.LNX.4.64.0707051312260.9789@racer.site","threadId":"8878","inReplyTo":null,"subject":"[PATCH] git init: activate rerere by default","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-05T12:16:02Z","receivedAt":"2007-07-05T12:16:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWe have a working implementation of rerere since long ago, and we even\nmake sure that it works as expected in a test case.  It is also a very\nuseful feature, so why not turn it on for the benefit of users who are\nnot even aware of it? This patch does that.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tMaybe it is too late for 1.5.3? But maybe this is nice enough to \n\thave in 1.5.3?\n\n\tBTW I shamelessly put in a comment to boost my comment ration on \n\tohloh.net...\n\n builtin-init-db.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex 66ddaeb..aa3a01e 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -293,6 +293,9 @@ static int create_default_files(const char *git_dir, const char *git_work_tree,\n \t\tif (git_work_tree)\n \t\t\tgit_config_set(\"core.worktree\", git_work_tree);\n \t}\n+\t/* activate rerere */\n+\tstrcpy(path + len, \"rr-cache\");\n+\tsafe_create_dir(path, 1);\n \treturn reinit;\n }\n \n-- \n1.5.3.rc0.2689.g99ca2-dirty\n"},{"id":"46545","messageId":"81b0412b0707050610mddaf5c0w724b747fe10ed6f9@mail.gmail.com","threadId":"8878","inReplyTo":"Pine.LNX.4.64.0707051312260.9789@racer.site","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-05T13:10:01Z","receivedAt":"2007-07-05T13:10:01Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 7/5/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>\n> We have a working implementation of rerere since long ago, and we even\n> make sure that it works as expected in a test case.  It is also a very\n> useful feature, so why not turn it on for the benefit of users who are\n> not even aware of it? This patch does that.\n\nMaybe just create in template directory?\n"},{"id":"46556","messageId":"7vsl82dcj0.fsf@assigned-by-dhcp.cox.net","threadId":"8878","inReplyTo":"81b0412b0707050610mddaf5c0w724b747fe10ed6f9@mail.gmail.com","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-05T16:46:11Z","receivedAt":"2007-07-05T16:46:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alex Riesen\" <raa.lkml@gmail.com> writes:\n\n> On 7/5/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>>\n>> We have a working implementation of rerere since long ago, and we even\n>> make sure that it works as expected in a test case.  It is also a very\n>> useful feature, so why not turn it on for the benefit of users who are\n>> not even aware of it? This patch does that.\n>\n> Maybe just create in template directory?\n\nSounds saner.\n"},{"id":"46559","messageId":"Pine.LNX.4.64.0707051811310.9789@racer.site","threadId":"8878","inReplyTo":"7vsl82dcj0.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-05T17:15:29Z","receivedAt":"2007-07-05T17:15:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Jul 2007, Junio C Hamano wrote:\n\n> \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n> \n> > On 7/5/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> >>\n> >> We have a working implementation of rerere since long ago, and we even\n> >> make sure that it works as expected in a test case.  It is also a very\n> >> useful feature, so why not turn it on for the benefit of users who are\n> >> not even aware of it? This patch does that.\n> >\n> > Maybe just create in template directory?\n> \n> Sounds saner.\n\nDoes it?\n\nI had the impression that the templates are meant for site-specific \nmodifications. My patch tried to make it more standard than that.\n\nFor example, you _could_ have set core.logallrefupdates from the \ntemplates, yet you chose not to, but rather hard-wire it into \"git init\". \nWhich I completely agree to.\n\nCiao,\nDscho\n"},{"id":"46560","messageId":"7vfy42d6m0.fsf@assigned-by-dhcp.cox.net","threadId":"8878","inReplyTo":"Pine.LNX.4.64.0707051811310.9789@racer.site","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-05T18:53:59Z","receivedAt":"2007-07-05T18:53:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Thu, 5 Jul 2007, Junio C Hamano wrote:\n>\n>> \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n>> \n>> > On 7/5/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>> >>\n>> >> We have a working implementation of rerere since long ago, and we even\n>> >> make sure that it works as expected in a test case.  It is also a very\n>> >> useful feature, so why not turn it on for the benefit of users who are\n>> >> not even aware of it? This patch does that.\n>> >\n>> > Maybe just create in template directory?\n>> \n>> Sounds saner.\n>\n> Does it?\n>\n> I had the impression that the templates are meant for site-specific \n> modifications. My patch tried to make it more standard than that.\n>\n> For example, you _could_ have set core.logallrefupdates from the \n> templates, yet you chose not to, but rather hard-wire it into \"git init\". \n> Which I completely agree to.\n\nI think what Alex meant is this.\n\ndiff --git a/templates/rr-cache-- b/templates/rr-cache--\nnew file mode 100644\nindex 0000000..fae8870\n--- /dev/null\n+++ b/templates/rr-cache--\n@@ -0,0 +1 @@\n+: this is just to ensure the directory exists.\n"},{"id":"46563","messageId":"Pine.LNX.4.64.0707052018260.9789@racer.site","threadId":"8878","inReplyTo":"7vfy42d6m0.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-05T19:22:43Z","receivedAt":"2007-07-05T19:22:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Jul 2007, Junio C Hamano wrote:\n\n> I think what Alex meant is this.\n> \n> diff --git a/templates/rr-cache-- b/templates/rr-cache--\n> new file mode 100644\n> index 0000000..fae8870\n> --- /dev/null\n> +++ b/templates/rr-cache--\n> @@ -0,0 +1 @@\n> +: this is just to ensure the directory exists.\n> \n\nYes, I fully understood.\n\nHowever, when I use a new version of Git (which happens regularly, since I \npull quite often), I do not update the templates. I guess that many \ndistros do not update their templates as often as the core, because they \nare much more likely to be modified distro-specifically. Further, there \nare some platforms which are insane enough that you cannot trust the \nexecutable bit, and therefore the templates are disabled by default.\n\nAll this means that the given patch would not hardly make rerere as \nwidespread as I intended.\n\nYes, templates are nice. But I don't think that templates are the way to \ngo for introducing nice features as rr-cache.\n\nCiao,\nDscho\n"},{"id":"46567","messageId":"20070705214032.GB8751@steel.home","threadId":"8878","inReplyTo":"Pine.LNX.4.64.0707052018260.9789@racer.site","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-05T21:40:32Z","receivedAt":"2007-07-05T21:40:32Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Johannes Schindelin, Thu, Jul 05, 2007 21:22:43 +0200:\n> Yes, templates are nice. But I don't think that templates are the way to \n> go for introducing nice features as rr-cache.\n\nLooks like you're trying to enforce the feature, not introduce.\nIt changes the user-visible behaviour, and this can be unexpected.\n\nIt is not like you see people asking question: \"How do I avoid\nrepeating the same boring conflict?\" every day on vger or irc.\n\nThat said, the templates are installed with every make install (and I\nsuppose with every .deb and .rpm), and template is copied in every new\nrepo, so people will get the rr-cache sooner or later. What's wrong\nwith \"a bit later\" than \"much sooner\"?\n"},{"id":"46572","messageId":"Pine.LNX.4.64.0707052327350.9789@racer.site","threadId":"8878","inReplyTo":"20070705214032.GB8751@steel.home","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-05T22:29:18Z","receivedAt":"2007-07-05T22:29:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Jul 2007, Alex Riesen wrote:\n\n> Johannes Schindelin, Thu, Jul 05, 2007 21:22:43 +0200:\n> > Yes, templates are nice. But I don't think that templates are the way to \n> > go for introducing nice features as rr-cache.\n> \n> Looks like you're trying to enforce the feature, not introduce.\n\nYes. Actually, since long I wondered if this feature should not be \ncontrolled by a core.rerere variable.\n\n> It changes the user-visible behaviour, and this can be unexpected.\n\nYes, but I think for the better.\n\n> It is not like you see people asking question: \"How do I avoid repeating \n> the same boring conflict?\" every day on vger or irc.\n\nThat is because people have been trained to cope with CVS. They do not \neven know rerere exists.\n\n> That said, the templates are installed with every make install (and I \n> suppose with every .deb and .rpm), and template is copied in every new \n> repo, so people will get the rr-cache sooner or later. What's wrong with \n> \"a bit later\" than \"much sooner\"?\n\nIn the part of my reply that you conveniently scissored, I explained that \nit is often not \"a bit later\", but \"never\".\n\nCiao,\nDscho\n"},{"id":"46594","messageId":"7v1wfmi090.fsf@assigned-by-dhcp.cox.net","threadId":"8878","inReplyTo":"Pine.LNX.4.64.0707052018260.9789@racer.site","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-06T05:12:27Z","receivedAt":"2007-07-06T05:12:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> .... I guess that many \n> distros do not update their templates as often as the core, because they \n> are much more likely to be modified distro-specifically.\n\nCan you back that up?  Fedora and Debian seem to ship them unmodified.\n\n> Further, there \n> are some platforms which are insane enough that you cannot trust the \n> executable bit, and therefore the templates are disabled by default.\n>\n> All this means that the given patch would not hardly make rerere as \n> widespread as I intended.\n\nIf you truly want to have rerere enabled by default, it might\nmake sense to:\n\n * Remove \"if test -d \"$GIT_DIR/rr-cache\" tests we have in the\n   existing users;\n\n * Implement a new test in builtin-rerere.c, as:\n\n   - if rerere.enabled configuration does not exist, check\n     $GIT_DIR/rr-cache as before;\n\n   - if rerere.enabled configuration is true, do not bother\n     checking $GIT_DIR/rr-cache, but just do it;\n\n   - if rerere.enabled configuration is explicitly set to false,\n     never use rerere.\n\n * Maybe later we might change the default value for\n   rerere.enabled to \"true\", IOW, everybody except people who\n   say \"[rerere] enabled = false\" in their configuration\n   automatically gets rerere.\n\nDoing it in git-init, either your patch or by installing a new\ntemplate, means existing old repository would never get the\nupdated behaviour unless the user runs \"git init\" there, which\nis not a very intuitive thing to do to begin with.\n"},{"id":"46611","messageId":"200707061112.l66BCb6u017186@mi1.bluebottle.com","threadId":"8878","inReplyTo":"Pine.LNX.4.64.0707052018260.9789@racer.site","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-07-06T11:12:23Z","receivedAt":"2007-07-06T11:12:23Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n\n> All this means that the given patch would not hardly make rerere as \n> widespread as I intended.\n>\n> Yes, templates are nice. But I don't think that templates are the way to \n> go for introducing nice features as rr-cache.\n\nI am sorry, but I can't understand how it works and how it is useful,\nafter reading the manual page of git-rerere three times.  Are there\n\"rerere tutorial for stupid newbies\" document somewhere?  I earlier\ncreated .git/rr-cache folder but I have not seen anything interesting\nhappened in my repository.\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":"46613","messageId":"Pine.LNX.4.64.0707061231050.4093@racer.site","threadId":"8878","inReplyTo":"7v1wfmi090.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git init: activate rerere by default","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-06T12:03:37Z","receivedAt":"2007-07-06T12:03:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Jul 2007, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > .... I guess that many distros do not update their templates as often \n> > as the core, because they are much more likely to be modified \n> > distro-specifically.\n> \n> Can you back that up?  Fedora and Debian seem to ship them unmodified.\n\nNo.\n\n> > Further, there are some platforms which are insane enough that you \n> > cannot trust the executable bit, and therefore the templates are \n> > disabled by default.\n\nBut this still holds.\n\n> If you truly want to have rerere enabled by default, it might make sense \n> to:\n> \n>  * Remove \"if test -d \"$GIT_DIR/rr-cache\" tests we have in the\n>    existing users;\n> \n>  * Implement a new test in builtin-rerere.c, as:\n> \n>    - if rerere.enabled configuration does not exist, check\n>      $GIT_DIR/rr-cache as before;\n> \n>    - if rerere.enabled configuration is true, do not bother\n>      checking $GIT_DIR/rr-cache, but just do it;\n> \n>    - if rerere.enabled configuration is explicitly set to false,\n>      never use rerere.\n> \n>  * Maybe later we might change the default value for\n>    rerere.enabled to \"true\", IOW, everybody except people who\n>    say \"[rerere] enabled = false\" in their configuration\n>    automatically gets rerere.\n> \n> Doing it in git-init, either your patch or by installing a new\n> template, means existing old repository would never get the\n> updated behaviour unless the user runs \"git init\" there, which\n> is not a very intuitive thing to do to begin with.\n\nWell, I finally bit the apple. Will post in a minute.\n\nCiao,\nDscho\n"}]}