git-cvsimport: force checkout of working tree after initial import
When creating a brand new git repository through git-cvsimport (not incremental import), force a checkout of HEAD of master as working tree after successful import using the -f switch to git checkout. Otherwise the working tree is empty, and all files are reported as 'deleted' by git status. This was noticed and reported by Cameron Dale through http://bugs.debian.org/430903 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gerrit Pape committed
Jun 28, 2007 at 11:12 UTC
7051c3b1294a110a862a7b48e983490fba32389f
1 file changed
+1
-1
git-cvsimport.perl
+1
-1
@@ -1007,7 +1007,7 @@ if ($orig_branch) {
1007
if ($opt_r && $opt_o ne 'HEAD');
1008
system('git-update-ref', 'HEAD', "$orig_branch");
1009
unless ($opt_i) {
1010
- system('git checkout');
1010
+ system('git checkout -f');
1011
die "checkout failed: $?\n" if $?;
1012
}
1013
}