Git development
 help / color / mirror / Atom feed
* [PATCH] git-cvsimport: force checkout of working tree after initial import
@ 2007-06-28 11:12 Gerrit Pape
  2007-06-29  4:41 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Pape @ 2007-06-28 11:12 UTC (permalink / raw)
  To: Junio C Hamano, git; +Cc: 430903

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>
---
 git-cvsimport.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 69ccb88..ba23eb8 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 $?;
 	}
 }
-- 
1.5.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-29  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 11:12 [PATCH] git-cvsimport: force checkout of working tree after initial import Gerrit Pape
2007-06-29  4:41 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox