refs.c: refactor resolve_ref_unsafe()
refs.c: teach Git to understand directories-as-refname
DEV