fetch.c: change s_update_ref to use a ref transaction