Sort refs in hash map

libgit seemed also to order the refs.

Signed-off-by: Sven Strickroth <email@cs-ware.de>