builtin/config.c: support `--type=<type>` as preferred alias for `--<type>`
[gitweb.git] / contrib / examples / git-svnimport.perl
index 4576c4a862c8ea0565a67eccdae6ef1ac4d9af9a..75a43e23b6138754e7dc780aa3a643be38e1ba14 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # This tool is copyright (c) 2005, Matthias Urlichs.
 # It is released under the Gnu Public License, version 2.
@@ -36,7 +36,7 @@
 
 sub usage() {
        print STDERR <<END;
-Usage: ${\basename $0}     # fetch/update GIT from SVN
+usage: ${\basename $0}     # fetch/update GIT from SVN
        [-o branch-for-HEAD] [-h] [-v] [-l max_rev] [-R repack_each_revs]
        [-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]
        [-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]
@@ -238,7 +238,7 @@ ($)
        my($d) = @_;
        $d =~ m#(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)#
                or die "Unparseable date: $d\n";
-       my $y=$1; $y-=1900 if $y>1900;
+       my $y=$1; $y+=1900 if $y<1000;
        return timegm($6||0,$5,$4,$3,$2-1,$y);
 }
 
@@ -289,7 +289,7 @@ ($$)
 unless(-d $git_dir) {
        system("git init");
        die "Cannot init the GIT db at $git_tree: $?\n" if $?;
-       system("git read-tree");
+       system("git read-tree --empty");
        die "Cannot init an empty tree: $?\n" if $?;
 
        $last_branch = $opt_o;