refs.c: add err arguments to reflog functions