Han-Wen Nienhuys [off-list ref] writes:
quoted
But I wonder if we need to even say this. Isn't it obvious from the
each_ref_fn API that nothing other than the refname, object id, and
what kind of ref it is, will be given to the user of the API, so it
would be natural for a caller that wants to do extra things it needs
to do for symrefs must act when it learns a ref is a symref? After
all, that is why the flags word is one of the parameters given to an
each_ref_fn.
Maybe it is obvious to you, but it was not obvious to me, coming from
JGit working on the RefDatabase.
If you found each_ref_fn API docs lacking, that probably is where
the information should go (i.e. regardless of type of refs, the
object name is filled correctly). We need to make it obvious to the
developers who needs to use and work on the code with the API
defined and described in refs.h
Thanks.