refs.c: Write reflogs for notes just like for branch heads