[PATCH] import-tars: be nice to wrong directory modes

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] import-tars: be nice to wrong directory modes

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:07

Some tars seem to have modes 0755 for directories, not 01000755. Do
not generate an empty object for them, but ignore them.

Noticed by riddochc on IRC.

Signed-off-by: Johannes Schindelin <redacted>
---
 contrib/fast-import/import-tars.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 1842146..5575080 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -52,6 +52,7 @@ foreach my $tar_file (@ARGV)
 			Z8 Z1 Z100 Z6
 			Z2 Z32 Z32 Z8 Z8 Z*', $_;
 		last unless $name;
+		next if $name =~ '/$';
 		$mode = oct $mode;
 		$size = oct $size;
 		$mtime = oct $mtime;
-- 
1.5.2.rc0.2496.g74f7

Re: [PATCH] import-tars: be nice to wrong directory modes

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:07

Johannes Schindelin [off-list ref] wrote:
Some tars seem to have modes 0755 for directories, not 01000755. Do
not generate an empty object for them, but ignore them.
This fix is small and corrects a rather ugly repository corruption,
so I've applied it to my gfi-maint branch.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help