commit_packed_refs(): report errors rather than dying