{"thread":{"id":"2659","subject":"[PATCH] git-mv is not able to handle big directories","startedAt":"2005-11-23T05:41:57Z","lastAt":"2005-11-28T08:49:47Z","messageCount":23,"participants":["Alexander Litvinov","Junio C Hamano","Randal L. Schwartz","Andreas Ericsson","Josef Weidendorfer","Ryan Anderson","H. Peter Anvin","Morten Welinder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12594","messageId":"200511231141.57683.lan@ac-sw.com","threadId":"2659","inReplyTo":null,"subject":"[PATCH] git-mv is not able to handle big directories","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-11-23T05:41:57Z","receivedAt":"2005-11-23T05:41:57Z","isPatch":true,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"When moving directory with large number of files git-mv says:\n> git-mv jsp* .\nCan't exec \"git-update-index\": Argument list too long at /usr/local/bin/git-mv \nline 193.\ngit-update-index failed to add new names with code -1\n\nThis patch fixes this by building list of files with limited len (currently \n5000) and executing git-update-index few times until all files will be \nprocessed. I don't know how to determinate limit of command line but 5000 \nseems safe enougth to me.\n\n\n--- git-mv.perl.orig\t2005-11-23 11:24:10.000000000 +0600\n+++ git-mv.perl\t2005-11-23 11:33:31.000000000 +0600\n@@ -185,13 +185,36 @@\n }\n \t\n my $rc;\n-if (scalar @changedfiles >0) {\n-\t$rc = system(\"git-update-index\",\"--\",@changedfiles);\n+while (scalar @changedfiles >0) {\n+\tmy @toHandle = ();\n+\tmy $len = 0;\n+\twhile ($len < 5000 && scalar(@changedfiles) >0) {\n+\t\tmy $f = pop(@changedfiles);\n+\t\t$len += length($f) + 1;\n+\t\tpush(@toHandle, $f);\n+\t}\n+\t$rc = system(\"git-update-index\",\"--\",@toHandle);\n \tdie \"git-update-index failed to update changed files with code $?\\n\" if $rc;\n }\n-if (scalar @addedfiles >0) {\n-\t$rc = system(\"git-update-index\",\"--add\",\"--\",@addedfiles);\n+while (scalar @addedfiles >0) {\n+\tmy @toHandle = ();\n+\tmy $len = 0;\n+\twhile ($len < 5000 && scalar(@addedfiles) >0) {\n+\t\tmy $f = pop(@addedfiles);\n+\t\t$len += length($f) + 1;\n+\t\tpush(@toHandle, $f);\n+\t}\n+\t$rc = system(\"git-update-index\",\"--add\",\"--\",@toHandle);\n \tdie \"git-update-index failed to add new names with code $?\\n\" if $rc;\n }\n-$rc = system(\"git-update-index\",\"--remove\",\"--\",@deletedfiles);\n-die \"git-update-index failed to remove old names with code $?\\n\" if $rc;\n+while (scalar @deletedfiles > 0) {\n+\tmy @toHandle = ();\n+\tmy $len = 0;\n+\twhile ($len < 5000 && scalar(@deletedfiles) >0) {\n+\t\tmy $f = pop(@deletedfiles);\n+\t\t$len += length($f) + 1;\n+\t\tpush(@toHandle, $f);\n+\t}\n+\t$rc = system(\"git-update-index\",\"--remove\",\"--\",@toHandle);\n+\tdie \"git-update-index failed to remove old names with code $?\\n\" if $rc;\n+}\n"},{"id":"12595","messageId":"7voe4b7uw7.fsf@assigned-by-dhcp.cox.net","threadId":"2659","inReplyTo":"200511231141.57683.lan@ac-sw.com","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T06:14:48Z","receivedAt":"2005-11-23T06:14:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Litvinov <lan@ac-sw.com> writes:\n\n> When moving directory with large number of files git-mv says:\n>> git-mv jsp* .\n> Can't exec \"git-update-index\": Argument list too long at /usr/local/bin/git-mv \n> line 193.\n> git-update-index failed to add new names with code -1\n>\n> This patch fixes this by building list of files with limited len (currently \n> 5000) and executing git-update-index few times until all files will be \n> processed. I don't know how to determinate limit of command line but 5000 \n> seems safe enougth to me.\n\nTwo comments.\n\n(1) the argument limit is enforced by the operating system in\n    bytes (including environment size unfortunately) so we might\n    want to count bytes not number of paths.  I heard GNU xargs\n    uses 131072 as the default limit.\n\n(2) I wonder if we can detect this particular failure case and\n    then fall back on splitting the arguments dynamically, maybe\n    something like this:\n\n\tsub xargs_system {\n        \tmy ($cmd, @args) = @_;\n                my $rc = system(@$cmd, @args);\n                if ($rc == 'argument list too long error') {\n                \tmy (@args0) = splice(@args, 0, @args/2);\n\t\t\t$rc = xargs_system($cmd, @args0);\n                        return $c if ($rc);\n                        return xargs_system($cmd, @args);\n\t\t}\n\t\treturn $rc;\n\t}\n\n    and:\n\n\t$rc = xargs_system([qw(git-update-index --)], @changedfiles);\n\t$rc = xargs_system([qw(git-update-index --add --)], @addedfiles);\n\t...\n"},{"id":"12596","messageId":"7vk6ez7u1y.fsf@assigned-by-dhcp.cox.net","threadId":"2659","inReplyTo":"7voe4b7uw7.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T06:32:57Z","receivedAt":"2005-11-23T06:32:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Two comments.\n>\n> (1) the argument limit is enforced by the operating system in\n> ...\n> (2) I wonder if we can detect this particular failure case and\n> ...\n\n(3) Even better, 'git-update-index -z --stdin'\n\n\tif (@changedfiles) {\n            open my $oh, qw(|- git-update-index -z --stdin)\n                    or die \"oops\";\n            for (@changedfiles) {\n                print $oh \"$_\\0\";\n\t    }\n\t    close $oh;\n\t}\n\n\n\n\tJC \"added too many features that myself cannot remember\" Hamano\n"},{"id":"12598","messageId":"200511231326.27972.lan@ac-sw.com","threadId":"2659","inReplyTo":"7voe4b7uw7.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-11-23T07:26:27Z","receivedAt":"2005-11-23T07:26:27Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"I have found one error during directory movig: If I move directory with one \nfile somewhere in it this script will try to add target directory instead of \nfile. Commenting lines starting from 190 solve this error. But I don't \nunderstand what is the logic behind this case ? Why do target directory \nchecked instead of target file ? Should we replace $dst my $destfiles[0] ?\n\nat line 190 in git-mv:\n    if (scalar @srcfiles == 1) {\n\tif ($overwritten{$dst} ==1) {\n\t    push @changedfiles, $dst;\n\t} else {\n\t    push @addedfiles, $dst;\n\t}\n    }\n    else {\n\tpush @addedfiles, @dstfiles;\n    }\n"},{"id":"12601","messageId":"867jazre78.fsf@blue.stonehenge.com","threadId":"2659","inReplyTo":"7vk6ez7u1y.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T07:55:07Z","receivedAt":"2005-11-23T07:55:07Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio>             open my $oh, qw(|- git-update-index -z --stdin)\nJunio>                     or die \"oops\";\n\nThis is Perl 5.6 or later.  Breaks on Perl 5.5, which is still in use\nin some places.\n\nTo be compatible with 5.5, you have to create a handle explicitly:\n\n        require IO::Handle;\n        my $oh = IO::Handle->new;\n        open $oh, qw(...) ...;\n\nThat works all the way back to 5.4, which is the earliest Perl\nsupported by the core team.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12602","messageId":"438420CC.4050303@op5.se","threadId":"2659","inReplyTo":"200511231326.27972.lan@ac-sw.com","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2005-11-23T07:57:00Z","receivedAt":"2005-11-23T07:57:00Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Alexander Litvinov wrote:\n> I have found one error during directory movig: If I move directory with one \n> file somewhere in it this script will try to add target directory instead of \n> file.\n\nAre you saying this setup\n\tfoodir/somefile.c     <--file\n\tnewdir/               <--directory\n\nwith this command\n\tgit-mv foodir/ newdir\n\ntries to create\n\tnewdir/foodir/somefile.c  <-- directory\n\nor does it create\n\tnewdir/somefile.c         <-- file\n\n?\n\nIt should create\n\tnewdir/foodir/somefile.c  <-- file\n\nOtherwise it's misbehaving.\n\nTry running it with the -v switch to make it shout out loud what it's \ntrying to do, and then paste the output here.\n\n> Commenting lines starting from 190 solve this error. But I don't \n> understand what is the logic behind this case ? Why do target directory \n> checked instead of target file ? Should we replace $dst my $destfiles[0] ?\n> \n> at line 190 in git-mv:\n>     if (scalar @srcfiles == 1) {\n> \tif ($overwritten{$dst} ==1) {\n> \t    push @changedfiles, $dst;\n> \t} else {\n> \t    push @addedfiles, $dst;\n> \t}\n>     }\n>     else {\n> \tpush @addedfiles, @dstfiles;\n>     }\n\nThis is broken. It only checks if there's just one source-file \nregardless of whether or not it resided in a subdirectory. I'm not \nexactly fluent in perl so I can't submit a patch, but the src option \nneeds to be directory aware, traverse all source directories and then \nmove the files axing everything but the bottom-most dirname to the \ndestination directory.\n\nAny takers?\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"12603","messageId":"7vu0e369p4.fsf@assigned-by-dhcp.cox.net","threadId":"2659","inReplyTo":"867jazre78.fsf@blue.stonehenge.com","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T08:37:59Z","receivedAt":"2005-11-23T08:37:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>\n> Junio>             open my $oh, qw(|- git-update-index -z --stdin)\n> Junio>                     or die \"oops\";\n>\n> This is Perl 5.6 or later.  Breaks on Perl 5.5, which is still in use\n> in some places.\n\nI should have known better than posting Perl code to the list\nwhere a real guru is lurking and making afool of myself ;-).\n\nThanks for the advice.  How much do we care about 5.5?  IOW, is\n\"in some places\" wide enough to matter?\n\ngit-cvsimport, git-svnimport and git-shortlog share the same\nproblem (svnimport declares that it wants 5.8).  perl58delta.pod\ndoes say list form of open for pipes is new in that version.  So\nwhat I wrote above requires 5.8 or better, perhaps?  cvsimport\nuses that same structure.  That is doubly Ouch.\n"},{"id":"12605","messageId":"200511231557.12547.lan@ac-sw.com","threadId":"2659","inReplyTo":"438420CC.4050303@op5.se","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-11-23T09:57:12Z","receivedAt":"2005-11-23T09:57:12Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"On Wednesday 23 November 2005 13:57, Andreas Ericsson wrote:\n> Are you saying this setup\n> \tfoodir/somefile.c     <--file\n> \tnewdir/               <--directory\n>\n> with this command\n> \tgit-mv foodir/ newdir\n\nIt is calling git-update-index --add newdir but actiual file structire is \ncorrect: \nnewdir/somefile.c - is a file\n"},{"id":"12606","messageId":"200511231621.34259.lan@ac-sw.com","threadId":"2659","inReplyTo":"438420CC.4050303@op5.se","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-11-23T10:21:34Z","receivedAt":"2005-11-23T10:21:34Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"On Wednesday 23 November 2005 13:57, Andreas Ericsson wrote:\n> This is broken. It only checks if there's just one source-file\n> regardless of whether or not it resided in a subdirectory. I'm not\n> exactly fluent in perl so I can't submit a patch, but the src option\n> needs to be directory aware, traverse all source directories and then\n> move the files axing everything but the bottom-most dirname to the\n> destination directory.\n>\n> Any takers?\n\nI still does not understand what this part should do. I know perl enought to \nfix it but I don't understand the logic.\n"},{"id":"12608","messageId":"200511231207.09846.Josef.Weidendorfer@gmx.de","threadId":"2659","inReplyTo":"200511231621.34259.lan@ac-sw.com","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-23T11:07:09Z","receivedAt":"2005-11-23T11:07:09Z","isPatch":false,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Wednesday 23 November 2005 11:21, Alexander Litvinov wrote:\n> On Wednesday 23 November 2005 13:57, Andreas Ericsson wrote:\n> > This is broken. It only checks if there's just one source-file\n> > regardless of whether or not it resided in a subdirectory.\n\nYes.\nFor git-update-index we have to use the file inside the directory.\n\nI just sent a patch for this.\n\nJosef\n"},{"id":"12611","messageId":"20051123135604.GB16995@mythryan2.michonline.com","threadId":"2659","inReplyTo":"7vu0e369p4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2005-11-23T13:56:04Z","receivedAt":"2005-11-23T13:56:04Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"On Wed, Nov 23, 2005 at 12:37:59AM -0800, Junio C Hamano wrote:\n> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n> \n> >>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n> >\n> > Junio>             open my $oh, qw(|- git-update-index -z --stdin)\n> > Junio>                     or die \"oops\";\n> >\n> > This is Perl 5.6 or later.  Breaks on Perl 5.5, which is still in use\n> > in some places.\n> \n> I should have known better than posting Perl code to the list\n> where a real guru is lurking and making afool of myself ;-).\n> \n> Thanks for the advice.  How much do we care about 5.5?  IOW, is\n> \"in some places\" wide enough to matter?\n> \n> git-cvsimport, git-svnimport and git-shortlog share the same\n> problem (svnimport declares that it wants 5.8).  perl58delta.pod\n> does say list form of open for pipes is new in that version.  So\n> what I wrote above requires 5.8 or better, perhaps?  cvsimport\n> uses that same structure.  That is doubly Ouch.\n\nNo, you're not using the list form for pipes.  I use that in\ngit-graft-ripple:\n\n\topen(P,\"-|\",\"git-rev-list\",\"--parents\",\"--merge-order\",$range)\n\nFor the kernel, requiring 5.8 shouldn't be a big issue. I suspect it's\nreally only the commercial Unixes where requiring 5.8 would be annoying.\n\nRandal, is my guess even remotely accurate?\n\n-- \n\nRyan Anderson\n  sometimes Pug Majere\n"},{"id":"12615","messageId":"86mzjvphhj.fsf_-_@blue.stonehenge.com","threadId":"2659","inReplyTo":"20051123135604.GB16995@mythryan2.michonline.com","subject":"Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T14:27:04Z","receivedAt":"2005-11-23T14:27:04Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Ryan\" == Ryan Anderson <ryan@michonline.com> writes:\n\nRyan> For the kernel, requiring 5.8 shouldn't be a big issue. I suspect it's\nRyan> really only the commercial Unixes where requiring 5.8 would be annoying.\n\nRyan> Randal, is my guess even remotely accurate?\n\nI'd say that 50% of the Perl-using population is at 5.6, with 25% each\nat 5.5 and 5.8.  Those on 5.5 are generally unable to upgrade Perl\nfor corporate reasons.\n\nTargetting Perl 5.6 would assist broad acceptance of git for the\ntypical commercial end user.  Targetting 5.5 where possible would\nensure practical success for everyone.\n\nHowever, I have not seen the \"target market\" of git discussed yet\n(I came late to the party), so if support for 5.6 (or 5.5) is not chosen,\nit merely limits the market.\n\nIf you'd like, I can review all the Perl code with a tool that\ndetermines the minimum Perl version, and provide patches to bring the\ncode to 5.5 level.  But if it's likely that someone will say \"this\nis not important to us\", I'd rather not waste my time. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12616","messageId":"86acfvphe0.fsf@blue.stonehenge.com","threadId":"2659","inReplyTo":"200511231619.41497.lan@ac-sw.com","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T14:29:11Z","receivedAt":"2005-11-23T14:29:11Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Alexander\" == Alexander Litvinov <lan@ac-sw.com> writes:\n\nAlexander> I have made this change. I also belive it will work on earlier perl but I \nAlexander> can't test this.\n\nThis patch looks good back to 5.5.  I didn't execute it either, but\nthe Perl version installed in my head gave it a thumbs-up. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12619","messageId":"200511231547.51988.Josef.Weidendorfer@gmx.de","threadId":"2659","inReplyTo":"200511231326.27972.lan@ac-sw.com","subject":"Re: git-mv is not able to handle directory with one file in it","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-23T14:47:51Z","receivedAt":"2005-11-23T14:47:51Z","isPatch":false,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Wednesday 23 November 2005 08:26, Alexander Litvinov wrote:\n> I have found one error during directory movig: If I move directory with one \n> file somewhere in it this script will try to add target directory instead of \n> file. Commenting lines starting from 190 solve this error. But I don't \n> understand what is the logic behind this case ? Why do target directory \n> checked instead of target file ?\n\n$src/$dst pairs match the arguments given on the command line of git-mv,\nAnd git-mv (as was git-rename) is able to move directory trees around.\n\nIt is simplier to keep the granularity at directories, as multiple moves\nof directories can not overlap each other. If you do it at file level, you\nhave to remote and create directories yourself.\n\nOf course, for git it is done at file level (that are the @srcfiles/@dstfiles\narrays), but this is quite trivial as git does not work with directories, but\nonly with files.\n\n> Should we replace $dst my $destfiles[0] ?\n\nYes, that was part of my patch.\n\nJosef\n"},{"id":"12632","messageId":"7vpsor5h7o.fsf@assigned-by-dhcp.cox.net","threadId":"2659","inReplyTo":"20051123135604.GB16995@mythryan2.michonline.com","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T18:53:15Z","receivedAt":"2005-11-23T18:53:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ryan Anderson <ryan@michonline.com> writes:\n\n> On Wed, Nov 23, 2005 at 12:37:59AM -0800, Junio C Hamano wrote:\n>> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n>> \n>> >>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>> >\n>> > Junio>             open my $oh, qw(|- git-update-index -z --stdin)\n>> >\n> ...\n> No, you're not using the list form for pipes.  I use that in\n> git-graft-ripple:\n>\n> \topen(P,\"-|\",\"git-rev-list\",\"--parents\",\"--merge-order\",$range)\n\nOh, I didn't?\n"},{"id":"12635","messageId":"7vwtiz4053.fsf@assigned-by-dhcp.cox.net","threadId":"2659","inReplyTo":"86mzjvphhj.fsf_-_@blue.stonehenge.com","subject":"Re: Perl version support","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T19:47:20Z","receivedAt":"2005-11-23T19:47:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n> I'd say that 50% of the Perl-using population is at 5.6, with 25% each\n> at 5.5 and 5.8.  Those on 5.5 are generally unable to upgrade Perl\n> for corporate reasons.\n\nI think the target market is people who use whatever POSIXy\nsystems for their own work.  To them, git and its dependencies\nare merely tools to get their job done, and while they might be\ncapable and even willing to match the version requirements if it\nis absolutely necessary, they'd rather spend their time on what\nthey do best (i.e. write software or documentation or whatever,\nwhose changes are to be managed by git), than installing or\nupgrading base software just to satisfy git.  And I'd like to\nsee their time spent on what they do best, instead of caring and\nfeeding of git, too.\n\nSo in that sense, excluding 75% of people with \"5.8 only\" is not\nacceptable at all, and covering 75% with \"5.6 or better\" might\nbe good enough, at least as a starter.\n\n> If you'd like, I can review all the Perl code with a tool that\n> determines the minimum Perl version, and provide patches to bring the\n> code to 5.5 level.\n\nIf it is not too much trouble, I'd appreciate it, at least the\nfirst half that can be done without taking too much of your time.\nIs it a mechanical \"lint\" like thing, that says \"line 47 you\nhave list form of pipe open -- that's 5.8 and better\"?\n"},{"id":"12638","messageId":"4384C8F2.2070909@michonline.com","threadId":"2659","inReplyTo":"7vpsor5h7o.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-mv is not able to handle big directories","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2005-11-23T19:54:26Z","receivedAt":"2005-11-23T19:54:26Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Junio C Hamano wrote:\n> Ryan Anderson <ryan@michonline.com> writes:\n> \n> \n>>On Wed, Nov 23, 2005 at 12:37:59AM -0800, Junio C Hamano wrote:\n>>\n>>>merlyn@stonehenge.com (Randal L. Schwartz) writes:\n>>>\n>>>\n>>>>>>>>>\"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>>>>\n>>>>Junio>             open my $oh, qw(|- git-update-index -z --stdin)\n>>>>\n>>\n>>...\n>>No, you're not using the list form for pipes.  I use that in\n>>git-graft-ripple:\n>>\n>>\topen(P,\"-|\",\"git-rev-list\",\"--parents\",\"--merge-order\",$range)\n> \n> \n> Oh, I didn't?\n\nSorry, I read after waking up and totally didn't see the \"qw\" in there.\n   You did, my bad.\n\n\n\n"},{"id":"12639","messageId":"86br0bm8yl.fsf@blue.stonehenge.com","threadId":"2659","inReplyTo":"7vwtiz4053.fsf@assigned-by-dhcp.cox.net","subject":"Re: Perl version support","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T19:59:30Z","receivedAt":"2005-11-23T19:59:30Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio> I think the target market is people who use whatever POSIXy\nJunio> systems for their own work.  To them, git and its dependencies\nJunio> are merely tools to get their job done, and while they might be\nJunio> capable and even willing to match the version requirements if it\nJunio> is absolutely necessary, they'd rather spend their time on what\nJunio> they do best (i.e. write software or documentation or whatever,\nJunio> whose changes are to be managed by git), than installing or\nJunio> upgrading base software just to satisfy git.  And I'd like to\nJunio> see their time spent on what they do best, instead of caring and\nJunio> feeding of git, too.\n\nYes, this is why I keep pointing out GNU tools being used instead of\nPOSIXy versions. :)  Mostly because they break on either my Darwin\nlaptop or my OpenBSD host server.\n\nJunio> So in that sense, excluding 75% of people with \"5.8 only\" is not\nJunio> acceptable at all, and covering 75% with \"5.6 or better\" might\nJunio> be good enough, at least as a starter.\n\nI think we're in agreement.\n\n>> If you'd like, I can review all the Perl code with a tool that\n>> determines the minimum Perl version, and provide patches to bring the\n>> code to 5.5 level.\n\nJunio> If it is not too much trouble, I'd appreciate it, at least the\nJunio> first half that can be done without taking too much of your time.\nJunio> Is it a mechanical \"lint\" like thing, that says \"line 47 you\nJunio> have list form of pipe open -- that's 5.8 and better\"?\n\nThe \"perlver\" tool installed with the \"Perl::MinimumVersion\" module\nfrom the CPAN will do about 80% of it.  The other 20% are things\nthat I can use my brain for.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12642","messageId":"4384E574.8060801@zytor.com","threadId":"2659","inReplyTo":"86mzjvphhj.fsf_-_@blue.stonehenge.com","subject":"Re: Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-11-23T21:56:04Z","receivedAt":"2005-11-23T21:56:04Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Randal L. Schwartz wrote:\n> \n> I'd say that 50% of the Perl-using population is at 5.6, with 25% each\n> at 5.5 and 5.8.  Those on 5.5 are generally unable to upgrade Perl\n> for corporate reasons.\n> \n> Targetting Perl 5.6 would assist broad acceptance of git for the\n> typical commercial end user.  Targetting 5.5 where possible would\n> ensure practical success for everyone.\n> \n> However, I have not seen the \"target market\" of git discussed yet\n> (I came late to the party), so if support for 5.6 (or 5.5) is not chosen,\n> it merely limits the market.\n> \n\nThere are a lot of Perl modules we use, so limiting it to 5.5 is \nprobably a showstopper.\n\nI'm very surprised you say that 5.6 is more prevalent than 5.8.\n\n\t-hpa\n"},{"id":"12643","messageId":"86hda3korg.fsf@blue.stonehenge.com","threadId":"2659","inReplyTo":"4384E574.8060801@zytor.com","subject":"Re: Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T22:01:07Z","receivedAt":"2005-11-23T22:01:07Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"H\" == H Peter Anvin <hpa@zytor.com> writes:\n\nH> There are a lot of Perl modules we use, so limiting it to 5.5 is\nH> probably a showstopper.\n\nHmm.  I should look at that then.  Most Perl Modules are 5.5\ncompatible, unless they've been written by naive people recently. :)\n\nH> I'm very surprised you say that 5.6 is more prevalent than 5.8.\n\nFor individual early adopters, 5.8 is nearly universal.  But a lot of\nmy corporate clients upgrade *very* slowly, and are on 5.6 for now.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12644","messageId":"118833cc0511231402k5fba4e1ta7704efbc5889b23@mail.gmail.com","threadId":"2659","inReplyTo":"4384E574.8060801@zytor.com","subject":"Re: Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"Morten Welinder","fromEmail":"mwelinder@gmail.com","sentAt":"2005-11-23T22:02:40Z","receivedAt":"2005-11-23T22:02:40Z","isPatch":true,"sender":{"key":"mwelinder@gmail.com","avatar":null},"body":"> I'm very surprised you say that 5.6 is more prevalent than 5.8.\n\nYou are overestimating the update-eagerness of the world.\n\nSunOS 5.8 seems to come with 5.005_03\nSunOS 5.9 seems to come with v5.6.1.\n\n(\"Seems\" because I am only 99% sure no-one around here has mucked with\nthe perl in /usr/bin/.)\n\nM.\n"},{"id":"12834","messageId":"438A6175.2020705@michonline.com","threadId":"2659","inReplyTo":"86mzjvphhj.fsf_-_@blue.stonehenge.com","subject":"Re: Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2005-11-28T01:46:29Z","receivedAt":"2005-11-28T01:46:29Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Randal L. Schwartz wrote:\n>>>>>>\"Ryan\" == Ryan Anderson <ryan@michonline.com> writes:\n> Ryan> For the kernel, requiring 5.8 shouldn't be a big issue. I suspect it's\n> Ryan> really only the commercial Unixes where requiring 5.8 would be annoying.\n> \n> Ryan> Randal, is my guess even remotely accurate?\n> \n> I'd say that 50% of the Perl-using population is at 5.6, with 25% each\n> at 5.5 and 5.8.  Those on 5.5 are generally unable to upgrade Perl\n> for corporate reasons.\n> \n> Targetting Perl 5.6 would assist broad acceptance of git for the\n> typical commercial end user.  Targetting 5.5 where possible would\n> ensure practical success for everyone.\n> \n> However, I have not seen the \"target market\" of git discussed yet\n> (I came late to the party), so if support for 5.6 (or 5.5) is not chosen,\n> it merely limits the market.\n\nWell, I think the general target market[1] for Linux probably applies\nhere, as well.  On the other hand, the users limited to Perl 5.5 for\ncorporate reasons are probably also prevented from installing new tools\nfor general use, so the difference may not matter very much.\n\n[1] - \"World domination\", of course.\n\n-- \n\nRyan Anderson\n  sometimes Pug Majere\n"},{"id":"12851","messageId":"438AC4AB.1040405@op5.se","threadId":"2659","inReplyTo":"438A6175.2020705@michonline.com","subject":"Re: Perl version support (was Re: [PATCH] git-mv is not able to handle big directories)","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2005-11-28T08:49:47Z","receivedAt":"2005-11-28T08:49:47Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Ryan Anderson wrote:\n> Randal L. Schwartz wrote:\n> \n>>However, I have not seen the \"target market\" of git discussed yet\n>>(I came late to the party), so if support for 5.6 (or 5.5) is not chosen,\n>>it merely limits the market.\n> \n> \n> Well, I think the general target market[1] for Linux probably applies\n> here, as well.  On the other hand, the users limited to Perl 5.5 for\n> corporate reasons are probably also prevented from installing new tools\n> for general use, so the difference may not matter very much.\n> \n> [1] - \"World domination\", of course.\n> \n\nServers with software installation restrictions are rarely used for \ndevelopment either and the server side part of git is all C. So long as \nthat's true I don't think we need to bother very much with staying \nbackwards compatible. It's nice if we manage it, but we shouldn't, imho, \nbend over backwards for the sake of perl 5.5 (or even 5.6).\n\nJust my two öre. :)\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}