Michael Haggerty [off-list ref] writes:
Instead of temporarily storing matched refs to temporary array
"return_refs", simply append them to newlist as we go. This changes
the order of references in newlist to strictly sorted if "--all" and
"--depth" and named references are all specified, but that usage is
broken anyway (see the last two tests in t5500).
Removes two warts (the temporary array in general, and the
fastarray[] special case) with one patch. Nicely done.