X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-cvsimport.perl;h=c0ae00bda74e68f98efc63c093efb73c7ff914f4;hb=d1802851b0c112a065b43e3f83d631f867b7e1ce;hp=6c0f5d29380015fb4fb2c2948bb367e8d493e793;hpb=8d707b62930cabd45f063c3be568fe80b5c829a9;p=git.git diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 6c0f5d29..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) { @@ -881,6 +877,7 @@ if($orig_branch) { } my $tip_at_end = `git-rev-parse --verify HEAD`; if ($tip_at_start ne $tip_at_end) { + for ($tip_at_start, $tip_at_end) { chomp; } print "Fetched into the current branch.\n" if $opt_v; system(qw(git-read-tree -u -m), $tip_at_start, $tip_at_end);