提交 b20171eb 编写于 作者: L Lars Noschinski 提交者: Junio C Hamano

cvsserver: Add support for packed refs

req_update still parses /refs/heads manually. Replace this by
a call to show-ref.
Signed-off-by: NLars Noschinski <lars@public.noschinski.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 374488f3
......@@ -947,21 +947,15 @@ sub req_update
# projects (heads in this case) to checkout.
#
if ($state->{module} eq '') {
my $heads_dir = $state->{CVSROOT} . '/refs/heads';
if (!opendir HEADS, $heads_dir) {
print "E [server aborted]: Failed to open directory, "
. "$heads_dir: $!\nerror\n";
return 0;
}
my $showref = `git show-ref --heads`;
print "E cvs update: Updating .\n";
while (my $head = readdir(HEADS)) {
if (-f $state->{CVSROOT} . '/refs/heads/' . $head) {
print "E cvs update: New directory `$head'\n";
}
}
closedir HEADS;
print "ok\n";
return 1;
for my $line (split '\n', $showref) {
if ( $line =~ m% refs/heads/(.*)$% ) {
print "E cvs update: New directory `$1'\n";
}
}
print "ok\n";
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册