From: Andy Whitcroft Date: Mon, 04 Jun 2007 09:01:49 GMT Subject: [PATCH 2/2] cvsimport: add /HEAD reference in separate remotes more Message-ID: In-Reply-To: <4663D42A.7090201@shadowen.org> When in separate remote mode (via -r ) we can now use the name HEAD for the CVS HEAD. In keeping with git-clone remotes//HEAD is creates as a symbolic ref to the user specified name for the HEAD which defaults to master. Signed-off-by: Andy Whitcroft --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 7837c7b..598b9c8 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -1026,6 +1026,8 @@ if ($orig_branch) { print "DONE; creating $orig_branch branch\n" if $opt_v; system("git-update-ref", "refs/heads/master", "$remote/$opt_o") unless -f "$git_dir/refs/heads/master"; + system("git-symbolic-ref", "$remote/HEAD", "$remote/$opt_o") + if ($opt_r && $opt_o ne 'HEAD'); system('git-update-ref', 'HEAD', "$orig_branch"); unless ($opt_i) { system('git checkout');