{"thread":{"id":"8759","subject":"[PATCH] git-cvsimport: force checkout of working tree after initial import","startedAt":"2007-06-28T11:12:07Z","lastAt":"2007-06-29T04:41:08Z","messageCount":2,"participants":["Gerrit Pape","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"45969","messageId":"20070628111207.28276.qmail@a0ecab5969a5b1.315fe32.mid.smarden.org","threadId":"8759","inReplyTo":null,"subject":"[PATCH] git-cvsimport: force checkout of working tree after initial import","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-06-28T11:12:07Z","receivedAt":"2007-06-28T11:12:07Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"When creating a brand new git repository through git-cvsimport (not\nincremental import), force a checkout of HEAD of master as working tree\nafter successful import using the -f switch to git checkout.  Otherwise\nthe working tree is empty, and all files are reported as 'deleted' by\ngit status.\n\nThis was noticed and reported by Cameron Dale through\n http://bugs.debian.org/430903\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n git-cvsimport.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 69ccb88..ba23eb8 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -1007,7 +1007,7 @@ if ($orig_branch) {\n \t\tif ($opt_r && $opt_o ne 'HEAD');\n \tsystem('git-update-ref', 'HEAD', \"$orig_branch\");\n \tunless ($opt_i) {\n-\t\tsystem('git checkout');\n+\t\tsystem('git checkout -f');\n \t\tdie \"checkout failed: $?\\n\" if $?;\n \t}\n }\n-- \n1.5.2.1\n"},{"id":"46019","messageId":"7vhcorid97.fsf@assigned-by-dhcp.pobox.com","threadId":"8759","inReplyTo":"20070628111207.28276.qmail@a0ecab5969a5b1.315fe32.mid.smarden.org","subject":"Re: [PATCH] git-cvsimport: force checkout of working tree after initial import","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-29T04:41:08Z","receivedAt":"2007-06-29T04:41:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}