aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-15 17:53:44 -0800
committerJunio C Hamano <junkio@cox.net>2005-12-15 17:53:44 -0800
commit06d900cf28117ad5260335ea9ab7533f223320bf (patch)
tree37d39e25e47d66e8a15c831382d7f43f41ef8875
parente5e3a9d8f91685cbbb4099f1fdfb9798461ef5d4 (diff)
downloadgit-06d900cf28117ad5260335ea9ab7533f223320bf.tar.gz
git-06d900cf28117ad5260335ea9ab7533f223320bf.tar.xz
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>
-rw-r--r--show-branch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/show-branch.c b/show-branch.c
index ab158eb7d..c7422460b 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);