X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-cvsimport.perl;h=c0ae00bda74e68f98efc63c093efb73c7ff914f4;hb=2eaf273d518717c84d748051e05210656f7b7e88;hp=3728294e740b466b97f623302ddd89fab1ba0e92;hpb=cb9594e28c940d2bbf4d7fb69c337d27155da37a;p=git.git diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 3728294e..c0ae00bd 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -677,11 +677,7 @@ my $commit = sub { waitpid($pid,0); die "Error running git-commit-tree: $?\n" if $?; - open(C,">$git_dir/refs/heads/$branch") - or die "Cannot open branch $branch for update: $!\n"; - print C "$cid\n" - or die "Cannot write branch $branch for update: $!\n"; - close(C) + system("git-update-ref refs/heads/$branch $cid") == 0 or die "Cannot write branch $branch for update: $!\n"; if($tag) {