Skip to content

Commit 06baffd

Browse files
awhitcroftgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbc9be5 commit 06baffd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-cvsimport.perl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,8 @@ sub commit {
10261026
print "DONE; creating $orig_branch branch\n" if $opt_v;
10271027
system("git-update-ref", "refs/heads/master", "$remote/$opt_o")
10281028
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');
10291031
system('git-update-ref', 'HEAD', "$orig_branch");
10301032
unless ($opt_i) {
10311033
system('git checkout');

0 commit comments

Comments
 (0)