A ref_kind may appear several times in the lines, in which case it will be present both dereferenced and non-dereferenced. Because we want to retrieve the revisions each ref is pointed to, we only want to keep the dereferenced occurrences.
We test for this case using the data from super-master-mind.refs which contains the following lines:
In this input, 0.0.2 and 0.0.3 are non-dereferenced items. The sha associated with them are identifiers for the tag objects, rather than the commit revisions they point to.
The dereferenced items are 0.0.2^{} and 0.0.3^{}, and their sha are the commit revisions.