Commit 6238ee32f50c81a3a366335b56251ac93ed493f5

Stefan Sperling 2018-06-13T19:29:57

show 'got log' options in sorted order

diff --git a/got/got.1 b/got/got.1
index cfeac18..b7807ca 100644
--- a/got/got.1
+++ b/got/got.1
@@ -91,7 +91,7 @@ will be checked out.
 .El
 .\".It Cm status
 .\"Show current status of files.
-.It Cm log [ Fl p ] [ Fl c Ar commit ] [ Fl l Ar N ] [ Fl f ] [ Ar repository-path ]
+.It Cm log [ Fl c Ar commit ] [ Fl f ] [ Fl l Ar N ] [ Fl p ] [ Ar repository-path ]
 Display history of a repository.
 If the
 .Ar repository path
@@ -101,20 +101,20 @@ The options for
 .Cm got log
 are as follows:
 .Bl -tag -width Ds
-.It Fl p
-Display the patch of modifications made in each commit.
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
 The expected argument is the name of a branch or a SHA1 hash which corresponds
 to a commit object.
-.It Fl l Ar N
-Limit history traversal to a given number of commits.
 .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
+Display the patch of modifications made in each commit.
 .El
 .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
 Display the differences between two objects in the repository.
diff --git a/got/got.c b/got/got.c
index 6319c20..a8dad30 100644
--- a/got/got.c
+++ b/got/got.c
@@ -427,7 +427,7 @@ print_commits(struct got_object *root_obj, struct got_object_id *root_id,
 __dead static void
 usage_log(void)
 {
-	fprintf(stderr, "usage: %s log [-pf] [-c commit] [ -l N ] "
+	fprintf(stderr, "usage: %s log [-c commit] [-f] [ -l N ] [-p] "
 	    "[repository-path]\n", getprogname());
 	exit(1);
 }