refs.c: add a public is_branch function