X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-cvsexportcommit.perl;fp=git-cvsexportcommit.perl;h=d5fbee7ba03b5c7064074539e8fd2c6518363b85;hb=576cfc86fc321688aec0bc7359fb1097e5717631;hp=5a8c011802c46356c9c842282baca8f6fb54f01b;hpb=c1fe2fe4fe685e0587c3949f953aab726de88994;p=git.git diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index 5a8c0118..d5fbee7b 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -103,8 +103,16 @@ undef @files; # don't need it anymore # check that the files are clean and up to date according to cvs my $dirty; -foreach my $f (@afiles, @mfiles, @dfiles) { - # TODO:we need to handle removed in cvs and/or new (from git) +foreach my $f (@afiles) { + my $status = `cvs -q status "$f" | grep '^File: '`; + + unless ($status =~ m/Status: Unknown$/) { + $dirty = 1; + warn "File $f is already known in your CVS checkout!\n"; + } +} +foreach my $f (@mfiles, @dfiles) { + # TODO:we need to handle removed in cvs my $status = `cvs -q status "$f" | grep '^File: '`; unless ($status =~ m/Status: Up-to-date$/) {