Skip to content

Commit

Permalink
Sort globbed refname in show-branch.
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Junio C Hamano committed Dec 16, 2005
1 parent e5e3a9d commit 06d900c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions show-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06d900c

Please sign in to comment.