1
From d5903b6989f91e3d8a6ee73d5ea540a91a48c516 Mon Sep 17 00:00:00 2001
2
From: Gerrit Pape <pape@smarden.org>
3
Date: Fri, 29 Jun 2007 12:35:53 +0000
4
Subject: [PATCH] git-cvsimport: force checkout of working tree after initial import
6
When creating a brand new git repository through git-cvsimport (not
7
incremental import), force a checkout of HEAD of master as working tree
8
after successful import using the -f switch to git checkout. Otherwise
9
the working tree is empty, and all files are reported as 'deleted' by
12
This was noticed and reported by Cameron Dale through
13
http://bugs.debian.org/430903
15
Signed-off-by: Gerrit Pape <pape@smarden.org>
17
git-cvsimport.perl | 2 +-
18
1 files changed, 1 insertions(+), 1 deletions(-)
20
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
21
index 4e6c9c6..c5c897f 100755
22
--- a/git-cvsimport.perl
23
+++ b/git-cvsimport.perl
24
@@ -1020,7 +1020,7 @@ if ($orig_branch) {
25
unless -f "$git_dir/refs/heads/master";
26
system('git-update-ref', 'HEAD', "$orig_branch");
28
- system('git checkout');
29
+ system('git checkout -f');
30
die "checkout failed: $?\n" if $?;