summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2007-06-28 11:12:07 +0000
committerJunio C Hamano <gitster@pobox.com>2007-06-28 21:16:53 -0700
commit7051c3b1294a110a862a7b48e983490fba32389f (patch)
tree239e89208e6315158e9700a2e00521de7c83a0d1
parentf57882505efe05990102a0d96b37c09baadae03d (diff)
downloadgit-7051c3b1294a110a862a7b48e983490fba32389f.tar.gz
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>
-rwxr-xr-xgit-cvsimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 69ccb88dde..ba23eb8eeb 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -1007,7 +1007,7 @@ if ($orig_branch) {
if ($opt_r && $opt_o ne 'HEAD');
system('git-update-ref', 'HEAD', "$orig_branch");
unless ($opt_i) {
- system('git checkout');
+ system('git checkout -f');
die "checkout failed: $?\n" if $?;
}
}