rename got log's -f option to -b
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
diff --git a/got/got.1 b/got/got.1
index be99b41..6fa26ab 100644
--- a/got/got.1
+++ b/got/got.1
@@ -156,7 +156,7 @@ using the following status codes:
If a
.Ar path
is specified, only show modifications within this path.
-.It Cm log [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl f ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
+.It Cm log [ Fl b ] [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
Display history of a repository.
If a
.Ar path
@@ -166,6 +166,11 @@ The options for
.Cm got log
are as follows:
.Bl -tag -width Ds
+.It Fl b
+Show the linear history of the current branch only by restricting
+history traversal to the first parent of each commit.
+Merge commits which affected the current branch will be shown but
+individual commits which originated on other branches will be omitted.
.It Fl c Ar commit
Start traversing history at the specified
.Ar commit .
@@ -177,11 +182,6 @@ if invoked in a work tree, or to the repository's HEAD reference.
Set the number of context lines shown in diffs with
.Fl p .
By default, 3 lines of context are shown.
-.It Fl f
-Restrict history traversal to the first parent of each commit.
-This shows the linear history of the current branch only.
-Merge commits which affected the current branch will be shown but
-individual commits which originated on other branches will be omitted.
.It Fl l Ar N
Limit history traversal to a given number of commits.
.It Fl p
@@ -416,7 +416,7 @@ In a work tree or a git repository directory, view changes committed in
the 3 most recent commits to the work tree's branch, or the branch resolved
via the repository's HEAD reference, respectively:
.Pp
-.Dl $ got log -p -l 3 -f
+.Dl $ got log -p -l 3 -b
.Pp
In a work tree or a git repository directory, create a new branch
.Dq unified-buffer-cache
diff --git a/got/got.c b/got/got.c
index 4268650..4d034c8 100644
--- a/got/got.c
+++ b/got/got.c
@@ -924,7 +924,7 @@ done:
__dead static void
usage_log(void)
{
- fprintf(stderr, "usage: %s log [-c commit] [-C number] [-f] [ -l N ] [-p] "
+ fprintf(stderr, "usage: %s log [-b] [-c commit] [-C number] [ -l N ] [-p] "
"[-r repository-path] [path]\n", getprogname());
exit(1);
}
@@ -953,8 +953,11 @@ cmd_log(int argc, char *argv[])
err(1, "pledge");
#endif
- while ((ch = getopt(argc, argv, "b:pc:C:l:fr:")) != -1) {
+ while ((ch = getopt(argc, argv, "bpc:C:l:r:")) != -1) {
switch (ch) {
+ case 'b':
+ first_parent_traversal = 1;
+ break;
case 'p':
show_patch = 1;
break;
@@ -972,9 +975,6 @@ cmd_log(int argc, char *argv[])
if (errstr != NULL)
err(1, "-l option %s", errstr);
break;
- case 'f':
- first_parent_traversal = 1;
- break;
case 'r':
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)