@matheusbsbs / matheus-bagliano / commits / 06d900cf28
Fork 0

Sort globbed refname in show-branch.

"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>

Junio C Hamano committed Dec 15, 2005 at 17:53 UTC 06d900cf28117ad5260335ea9ab7533f223320bf
1 file changed +2
show-branch.c
+2
@@ -450,6 +450,8 @@ static void append_one_rev(const char *av)
450 if (saved_matches == ref_name_cnt &&
451 ref_name_cnt < MAX_REVS)
452 error("no matching refs with %s", av);
453 + if (saved_matches + 1 < ref_name_cnt)
454 + sort_ref_range(saved_matches, ref_name_cnt);
455 return;
456 }
457 die("bad sha1 reference %s", av);