receive-pack.c: use a reference transaction for updating the refs