Merge branch 'svn' of http://netz.smurf.noris.de/git/git
[git.git] / git-svnimport.perl
index 45486a8..20a8572 100755 (executable)
@@ -108,7 +108,7 @@ sub conn {
 sub file {
        my($self,$path,$rev) = @_;
 
-       my ($fh, $name) = tempfile('gitsvn.XXXXXX', 
+       my ($fh, $name) = tempfile('gitsvn.XXXXXX',
                    DIR => File::Spec->tmpdir(), UNLINK => 1);
 
        print "... $rev $path ...\n" if $opt_v;
@@ -163,9 +163,9 @@ sub getwd() {
 
 sub get_headref($$) {
     my $name    = shift;
-    my $git_dir = shift; 
+    my $git_dir = shift;
     my $sha;
-    
+
     if (open(C,"$git_dir/refs/heads/$name")) {
        chomp($sha = <C>);
        close(C);
@@ -235,7 +235,7 @@ EOM
 
        $forward_master =
            $opt_o ne 'master' && -f "$git_dir/refs/heads/master" &&
-           system('cmp', '-s', "$git_dir/refs/heads/master", 
+           system('cmp', '-s', "$git_dir/refs/heads/master",
                                "$git_dir/refs/heads/$opt_o") == 0;
 
        # populate index
@@ -285,8 +285,8 @@ sub get_file($$$) {
                $res = $lwp_ua->request($req);
                if ($res->is_success) {
                        my $fh;
-                       ($fh, $name) = tempfile('gitsvn.XXXXXX', 
-                       DIR => File::Spec->tmpdir(), UNLINK => 1);
+                       ($fh, $name) = tempfile('gitsvn.XXXXXX',
+                       DIR => File::Spec->tmpdir(), UNLINK => 1);
                        print $fh $res->content;
                        close($fh) or die "Could not write $name: $!\n";
                } else {
@@ -352,7 +352,7 @@ sub copy_subdir($$$$$$) {
                print "... found $path$p ...\n" if $opt_v;
                push(@$new,[$mode,$sha1,$path.$p]);
        }
-       close($f) or 
+       close($f) or
                print STDERR "$newrev:$newbranch: could not list files in $oldpath \@ $rev\n";
 }
 
@@ -567,7 +567,7 @@ sub commit {
                                                push @par, '-p', $mparent;
                                                print OUT "Merge parent branch: $mparent\n" if $opt_v;
                                        }
-                               } 
+                               }
                        }
 
                        exec("env",
@@ -604,7 +604,7 @@ sub commit {
                print "... no known parent\n" if $opt_v;
        } elsif(not $tag) {
                print "Writing to refs/heads/$dest\n" if $opt_v;
-               open(C,">$git_dir/refs/heads/$dest") and 
+               open(C,">$git_dir/refs/heads/$dest") and
                print C ("$cid\n") and
                close(C)
                        or die "Cannot write branch $dest for update: $!\n";
@@ -614,7 +614,7 @@ sub commit {
                my($in, $out) = ('','');
                $last_rev = "-" if %$changed_paths;
                # the tag was 'complex', i.e. did not refer to a "real" revision
-               
+
                $dest =~ tr/_/\./ if $opt_u;
 
                my $pid = open2($in, $out, 'git-mktag');