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 @@ ($)
579579 return $r ;
580580}
581581
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+
582590-d $git_tree
583591 or mkdir ($git_tree ,0777)
584592 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+ }
586597
587598my $last_branch = " " ;
588599my $orig_branch = " " ;
644655-f " $git_dir /cvs-authors" and
645656 read_author_info(" $git_dir /cvs-authors" );
646657if ($opt_A ) {
647- read_author_info($opt_A );
658+ read_author_info(munge_user_filename( $opt_A ) );
648659 write_author_info(" $git_dir /cvs-authors" );
649660}
650661
679690 $? == 0 or die " git-cvsimport: fatal: cvsps reported error\n " ;
680691 close $cvspsfh ;
681692} else {
682- $cvspsfile = $opt_P ;
693+ $cvspsfile = munge_user_filename( $opt_P ) ;
683694}
684695
685696open (CVS, " <$cvspsfile " ) or die $! ;
You can’t perform that action at this time.
0 commit comments