{"thread":{"id":"7891","subject":"[PATCH] import-tars: be nice to wrong directory modes","startedAt":"2007-04-28T23:59:47Z","lastAt":"2007-04-29T01:36:33Z","messageCount":5,"participants":["Johannes Schindelin","Shawn O. Pearce","Junio C Hamano","Randal L. Schwartz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"40679","messageId":"Pine.LNX.4.64.0704290159230.29859@racer.site","threadId":"7891","inReplyTo":null,"subject":"[PATCH] import-tars: be nice to wrong directory modes","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-04-28T23:59:47Z","receivedAt":"2007-04-28T23:59:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSome tars seem to have modes 0755 for directories, not 01000755. Do\nnot generate an empty object for them, but ignore them.\n\nNoticed by riddochc on IRC.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n contrib/fast-import/import-tars.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl\nindex 1842146..5575080 100755\n--- a/contrib/fast-import/import-tars.perl\n+++ b/contrib/fast-import/import-tars.perl\n@@ -52,6 +52,7 @@ foreach my $tar_file (@ARGV)\n \t\t\tZ8 Z1 Z100 Z6\n \t\t\tZ2 Z32 Z32 Z8 Z8 Z*', $_;\n \t\tlast unless $name;\n+\t\tnext if $name =~ '/$';\n \t\t$mode = oct $mode;\n \t\t$size = oct $size;\n \t\t$mtime = oct $mtime;\n-- \n1.5.2.rc0.2496.g74f7\n"},{"id":"40680","messageId":"20070429000842.GR5942@spearce.org","threadId":"7891","inReplyTo":"Pine.LNX.4.64.0704290159230.29859@racer.site","subject":"Re: [PATCH] import-tars: be nice to wrong directory modes","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-29T00:08:42Z","receivedAt":"2007-04-29T00:08:42Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Some tars seem to have modes 0755 for directories, not 01000755. Do\n> not generate an empty object for them, but ignore them.\n\nThis fix is small and corrects a rather ugly repository corruption,\nso I've applied it to my gfi-maint branch.\n\n-- \nShawn.\n"},{"id":"40682","messageId":"7vk5vwhttj.fsf@assigned-by-dhcp.cox.net","threadId":"7891","inReplyTo":"20070429000842.GR5942@spearce.org","subject":"Re: [PATCH] import-tars: be nice to wrong directory modes","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-29T01:07:20Z","receivedAt":"2007-04-29T01:07:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>> \n>> Some tars seem to have modes 0755 for directories, not 01000755. Do\n>> not generate an empty object for them, but ignore them.\n>\n> This fix is small and corrects a rather ugly repository corruption,\n> so I've applied it to my gfi-maint branch.\n\nGood teamplay.  So you want me to pull gfi-maint to maint and\ngfi-master to master?\n"},{"id":"40683","messageId":"20070429011121.GT5942@spearce.org","threadId":"7891","inReplyTo":"7vk5vwhttj.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] import-tars: be nice to wrong directory modes","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-04-29T01:11:21Z","receivedAt":"2007-04-29T01:11:21Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n> \n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> >> \n> >> Some tars seem to have modes 0755 for directories, not 01000755. Do\n> >> not generate an empty object for them, but ignore them.\n> >\n> > This fix is small and corrects a rather ugly repository corruption,\n> > so I've applied it to my gfi-maint branch.\n> \n> Good teamplay.  So you want me to pull gfi-maint to maint and\n> gfi-master to master?\n\nRight.\n\nAnd apply the fsck patch i sent to the list.  ;-)\n \n-- \nShawn.\n"},{"id":"40684","messageId":"86tzv07yhq.fsf@blue.stonehenge.com","threadId":"7891","inReplyTo":"Pine.LNX.4.64.0704290159230.29859@racer.site","subject":"Re: [PATCH] import-tars: be nice to wrong directory modes","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2007-04-29T01:36:33Z","receivedAt":"2007-04-29T01:36:33Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Johannes\" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\nJohannes> +\t\tnext if $name =~ '/$';\n\nThis is misleading.  That's a regex there.  And it also falsely matches a\nstring ending in \"/\\n\", but I bet there are parts of git that break on those\nfilenames too. :)\n\nConsider:\n\n        next if $name =~ m{/\\z};\n\nwhich matches precisely when the filename ends in /.\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"}]}