summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f578825)
raw | patch | inline | side by side (parent: f578825)
author | Gerrit Pape <pape@smarden.org> | |
Thu, 28 Jun 2007 11:12:07 +0000 (11:12 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Jun 2007 04:16:53 +0000 (21:16 -0700) |
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>
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>
git-cvsimport.perl | patch | blob | history |
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 69ccb88dde188a5a73eadf3bb8f778afce833b2f..ba23eb8eebdb841139062d4221c87515b96d8729 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
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 $?;
}
}