Skip to content

Commit 995bdc7

Browse files
Michael J Grubergitster
authored andcommitted
git-merge-base/git-show-branch: Cleanup documentation and usage
Make sure that usage strings and documentation coincide with each other and with the actual code. Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 30ca4ca commit 995bdc7

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Documentation/git-merge-base.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ git-merge-base - Find as good common ancestors as possible for a merge
88

99
SYNOPSIS
1010
--------
11-
'git merge-base' [--all] <commit> <commit>...
11+
'git merge-base' [-a|--all] <commit> <commit>...
1212

1313
DESCRIPTION
1414
-----------
1515

16-
'git-merge-base' finds best common ancestor(s) between two commits to use
16+
'git merge-base' finds best common ancestor(s) between two commits to use
1717
in a three-way merge. One common ancestor is 'better' than another common
1818
ancestor if the latter is an ancestor of the former. A common ancestor
1919
that does not have any better common ancestor is a 'best common
@@ -29,6 +29,7 @@ the given two commits.
2929

3030
OPTIONS
3131
-------
32+
-a::
3233
--all::
3334
Output all merge bases for the commits, instead of just one.
3435

Documentation/git-show-branch.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ git-show-branch - Show branches and their commits
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git show-branch' [--all] [--remotes] [--topo-order | --date-order]
12-
[--current] [--color | --no-color]
11+
'git show-branch' [-a|--all] [-r|--remotes] [--topo-order | --date-order]
12+
[--current] [--color | --no-color] [--sparse]
1313
[--more=<n> | --list | --independent | --merge-base]
1414
[--no-name | --sha1-name] [--topics]
1515
[<rev> | <glob>]...
16+
1617
'git show-branch' (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]
1718

1819
DESCRIPTION

builtin-merge-base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
2323
}
2424

2525
static const char * const merge_base_usage[] = {
26-
"git merge-base [--all] <commit-id> <commit-id>...",
26+
"git merge-base [-a|--all] <commit> <commit>...",
2727
NULL
2828
};
2929

builtin-show-branch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "parse-options.h"
77

88
static const char* show_branch_usage[] = {
9-
"git show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base] [--topics] [--color] [<refs>...]",
10-
"--reflog[=n[,b]] [--list] [--color] <branch>",
9+
"git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...",
10+
"git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]",
1111
NULL
1212
};
1313

0 commit comments

Comments
 (0)