X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=show-branch.c;h=c7422460be0a68dc34baa1dc8b66aa44559d56de;hb=724b511d4fb363ebee828ba3992c831ba006444c;hp=bff690d988957ec8c4bc76db6adeeea5ee6987b8;hpb=5e80092f7e6db09a40a62e837ca3f74f0bc5ad73;p=git.git diff --git a/show-branch.c b/show-branch.c index bff690d9..c7422460 100644 --- a/show-branch.c +++ b/show-branch.c @@ -5,7 +5,7 @@ #include "refs.h" static const char show_branch_usage[] = -"git-show-branch [--all] [--heads] [--tags] [--more=count | --list | --independent | --merge-base ] [...]"; +"git-show-branch [--all] [--heads] [--tags] [--topo-order] [--more=count | --list | --independent | --merge-base ] [...]"; #define UNINTERESTING 01 @@ -55,7 +55,7 @@ static void name_commit(struct commit *commit, const char *head_name, int nth) /* Parent is the first parent of the commit. We may name it * as (n+1)th generation ancestor of the same head_name as - * commit is nth generation ancestore of, if that generation + * commit is nth generation ancestor of, if that generation * number is better than the name it already has. */ static void name_parent(struct commit *commit, struct commit *parent) @@ -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);