"git show-branch bugs/*" shows all branches whose name match the
specified pattern, but in the order readdir() happened to
returned. Sort them to make the output more predictable.
Signed-off-by: Junio C Hamano <junkio@cox.net>
if (saved_matches == ref_name_cnt &&
ref_name_cnt < MAX_REVS)
error("no matching refs with %s", av);
+ if (saved_matches + 1 < ref_name_cnt)
+ sort_ref_range(saved_matches, ref_name_cnt);
return;
}
die("bad sha1 reference %s", av);