summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-06-04 10:01:49 +0100
committerJunio C Hamano <gitster@pobox.com>2007-06-06 02:35:49 -0700
commit06baffd3df7031d4d5cea223daf3512038d25f45 (patch)
treeaf5cadee6a231a379f5f19f5f75eecb2838e34aa /git-cvsimport.perl
parentcbc9be5ca3989e522f6ad0dfe3697657ecb4b595 (diff)
downloadgit-06baffd3df7031d4d5cea223daf3512038d25f45.tar.gz
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>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 7837c7bfb6..598b9c8da9 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');