commit 499d7ecc534806c7daf8795b1c9f76575520921f from: Stefan Sperling date: Wed May 22 14:19:11 2019 UTC rename got log's -f option to -b commit - 540feb5160dec0fb8d1516bd3aa5ffda38e069d2 commit + 499d7ecc534806c7daf8795b1c9f76575520921f blob - be99b41b349f4eecaecfccb6ba1bbc9721f68c49 blob + 6fa26abb6a48c20d904868b760a0618258fa488e --- got/got.1 +++ 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 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 cha 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 @@ -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; @@ -971,9 +974,6 @@ cmd_log(int argc, char *argv[]) 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);