summaryrefslogtreecommitdiff
path: root/show-branch.c
diff options
context:
space:
mode:
Diffstat (limited to 'show-branch.c')
-rw-r--r--show-branch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/show-branch.c b/show-branch.c
index ab158eb..c742246 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);