@matheusbsbs / matheus-bagliano / commits / 06baffd3df
Fork 0

cvsimport: add <remote>/HEAD reference in separate remotes more

When in separate remote mode (via -r <remote>) we can now use the name HEAD for the CVS HEAD. In keeping with git-clone remotes/<remote>/HEAD is creates as a symbolic ref to the user specified name for the HEAD which defaults to master. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Andy Whitcroft committed Jun 4, 2007 at 10:01 UTC 06baffd3df7031d4d5cea223daf3512038d25f45
1 file changed +2
git-cvsimport.perl
+2
@@ -1026,6 +1026,8 @@ if ($orig_branch) {
1026 print "DONE; creating $orig_branch branch\n" if $opt_v;
1027 system("git-update-ref", "refs/heads/master", "$remote/$opt_o")
1028 unless -f "$git_dir/refs/heads/master";
1029 + system("git-symbolic-ref", "$remote/HEAD", "$remote/$opt_o")
1030 + if ($opt_r && $opt_o ne 'HEAD');
1031 system('git-update-ref', 'HEAD', "$orig_branch");
1032 unless ($opt_i) {
1033 system('git checkout');