commit - 540feb5160dec0fb8d1516bd3aa5ffda38e069d2
commit + 499d7ecc534806c7daf8795b1c9f76575520921f
blob - be99b41b349f4eecaecfccb6ba1bbc9721f68c49
blob + 6fa26abb6a48c20d904868b760a0618258fa488e
--- got/got.1
+++ got/got.1
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
.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 .
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
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
blob - 42686506992a466294903b32aabb32a6a1a5ddbd
blob + 4d034c8af70fd54a7de2623002e97255dca49eaf
--- got/got.c
+++ got/got.c
__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);
}
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;
limit = strtonum(optarg, 1, INT_MAX, &errstr);
if (errstr != NULL)
err(1, "-l option %s", errstr);
- break;
- case 'f':
- first_parent_traversal = 1;
break;
case 'r':
repo_path = realpath(optarg, NULL);