Browse Source

Merge branch 'maint' of git://repo.or.cz/git/fastimport into maint

* 'maint' of git://repo.or.cz/git/fastimport:
  Don't allow empty pathnames in fast-import
  import-tars: be nice to wrong directory modes
maint
Junio C Hamano 18 years ago
parent
commit
5b5fe9a526
  1. 1
      contrib/fast-import/import-tars.perl
  2. 2
      fast-import.c

1
contrib/fast-import/import-tars.perl

@ -52,6 +52,7 @@ foreach my $tar_file (@ARGV)
Z8 Z1 Z100 Z6 Z8 Z1 Z100 Z6
Z2 Z32 Z32 Z8 Z8 Z*', $_; Z2 Z32 Z32 Z8 Z8 Z*', $_;
last unless $name; last unless $name;
next if $name =~ '/$';
$mode = oct $mode; $mode = oct $mode;
$size = oct $size; $size = oct $size;
$mtime = oct $mtime; $mtime = oct $mtime;

2
fast-import.c

@ -1193,6 +1193,8 @@ static int tree_content_set(
n = slash1 - p; n = slash1 - p;
else else
n = strlen(p); n = strlen(p);
if (!n)
die("Empty path component found in input");


for (i = 0; i < t->entry_count; i++) { for (i = 0; i < t->entry_count; i++) {
e = t->entries[i]; e = t->entries[i];

Loading…
Cancel
Save