File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -579,10 +579,21 @@ ($)
579
579
return $r ;
580
580
}
581
581
582
+ my $user_filename_prepend = ' ' ;
583
+ sub munge_user_filename {
584
+ my $name = shift ;
585
+ return File::Spec-> file_name_is_absolute($name ) ?
586
+ $name :
587
+ $user_filename_prepend . $name ;
588
+ }
589
+
582
590
-d $git_tree
583
591
or mkdir ($git_tree ,0777)
584
592
or die " Could not create $git_tree : $! " ;
585
- chdir ($git_tree );
593
+ if ($git_tree ne ' .' ) {
594
+ $user_filename_prepend = getwd() . ' /' ;
595
+ chdir ($git_tree );
596
+ }
586
597
587
598
my $last_branch = " " ;
588
599
my $orig_branch = " " ;
644
655
-f " $git_dir /cvs-authors" and
645
656
read_author_info(" $git_dir /cvs-authors" );
646
657
if ($opt_A ) {
647
- read_author_info($opt_A );
658
+ read_author_info(munge_user_filename( $opt_A ) );
648
659
write_author_info(" $git_dir /cvs-authors" );
649
660
}
650
661
679
690
$? == 0 or die " git-cvsimport: fatal: cvsps reported error\n " ;
680
691
close $cvspsfh ;
681
692
} else {
682
- $cvspsfile = $opt_P ;
693
+ $cvspsfile = munge_user_filename( $opt_P ) ;
683
694
}
684
695
685
696
open (CVS, " <$cvspsfile " ) or die $! ;
You can’t perform that action at this time.
0 commit comments