From: Junio C Hamano Date: Fri, 16 Dec 2005 01:53:44 +0000 (-0800) Subject: Sort globbed refname in show-branch. X-Git-Tag: v1.0.0^2~33 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=06d900cf28117ad5260335ea9ab7533f223320bf;p=git.git 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 --- diff --git a/show-branch.c b/show-branch.c index ab158eb7..c7422460 100644 --- a/show-branch.c +++ b/show-branch.c @@ -450,6 +450,8 @@ static void append_one_rev(const char *av) 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);