Am Montag, den 12.02.2007, 12:28 -0500 schrieb Shawn O. Pearce: ...yes, and this should be supported. There is an simple example in the Archive::Tar manpage. So something like "$tar = new Archive::Tar(*I)" is possible to use the original filehandle but I removed this code before reading the whole manpage. And Archive::Tar is a little bit slower then your unpack() and it reads the whole file into memory which is not so good. I have used it to play a bit with this nice fast-import stuff. Maybe, but I haven't tested it with some bigger tar files. I think we should stay with your unpack() version, it works, is faster and doesn't read the whole file into memory. In the Archive::Tar manpage they use gunzip and uncompress instead of zcat or gzcat, so what do you think about the following patch? diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl index 990c9e7..5585a8b 100755 --- a/contrib/fast-import/import-tars.perl +++ b/contrib/fast-import/import-tars.perl @@ -25,11 +25,14 @@ foreach my $tar_file (@ARGV) my $tar_name = $1; if ($tar_name =~ s/\.(tar\.gz|tgz)$//) { - open(I, '-|', 'gzcat', $tar_file) or die "Unable to gzcat $tar_file: $!\n"; + open(I, '-|', 'gunzip', '-c', $tar_file) + or die "Unable to gunzip -c $tar_file: $!\n"; } elsif ($tar_name =~ s/\.(tar\.bz2|tbz2)$//) { - open(I, '-|', 'bzcat', $tar_file) or die "Unable to bzcat $tar_file: $!\n"; + open(I, '-|', 'bunzip2', '-c', $tar_file) + or die "Unable to bunzip2 -c $tar_file: $!\n"; } elsif ($tar_name =~ s/\.tar\.Z$//) { - open(I, '-|', 'zcat', $tar_file) or die "Unable to zcat $tar_file: $!\n"; + open(I, '-|', 'uncompress', '-c', $tar_file) + or die "Unable to uncompress -c $tar_file: $!\n"; } elsif ($tar_name =~ s/\.tar$//) { open(I, $tar_file) or die "Unable to open $tar_file: $!\n"; } else { ... the $git_mode patch ... Yes, I had this change first in another patch but i forgot to mail it to the list. ... Good, I no longer think this Archive::Tar stuff is such a good idea. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Tim Tassonis | reiser4 for 2.6.27-rc1 |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Alan Chandler | Question around git-shell usage in Everyday Git |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Jakub Narebski | [PATCH] gitweb: Use File::Find::find in git_get_projects_list |
| Richard Stallman | Real men don't attack straw men |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| Girish Venkatachalam | Hazy top of mind questions on spam control with OpenBSD |
| Jussi Peltola | Re: Remote Admin Card - Dell DRAC or HP ILO2 ? |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
| Stephen Pierce | SLS |
| Sander van Malssen | uemacs |
