Ce que je l'ai fait est modifié le script perl git-de cvsimport, j'ai changé la méthode update_index()
de:
sub update_index (\@\@) {
my $old = shift;
my $new = shift;
open(my $fh, '|-', qw(git update-index -z --index-info))
or die "unable to open git update-index: $!";
print $fh
(map { "0 0000000000000000000000000000000000000000\t$_\0" }
@$old),
(map { '100' . sprintf('%o', $_->[0]) . " $_->[1]\t$_->[2]\0" }
@$new)
or die "unable to write to git update-index: $!";
close $fh
or die "unable to write to git update-index: $!";
$? and die "git update-index reported error: $?";
}
Pour:
sub update_index (\@\@) {
my $old = shift;
my $new = shift;
open(my $fh, '|-', qw(git update-index -z --index-info))
or die "unable to open git update-index: $!";
print $fh
(map { "0 0000000000000000000000000000000000000000\t$cvs_tree/$_\0" }
@$old),
(map { '100' . sprintf('%o', $_->[0]) . " $_->[1]\t$cvs_tree/$_->[2]\0" }
@$new)
or die "unable to write to git update-index: $!";
close $fh
or die "unable to write to git update-index: $!";
$? and die "git update-index reported error: $?";
}
(Notez l'ajout du $cvs_tree
variable.)
Fonctionne comme un charme. Pour exécuter:
perl git-cvsimport -v ... (rest of regular git-cvsimport arguments)
Il est dit que vous avez besoin d'un accès direct au référentiel pour utiliser cvs2git. Si vous avez juste accès à distance, c'est un hack, apparemment. – Neil