Commit 1fd6d7eaef8643842b590fd6ffeedb6058fae21b

Stefan Sperling 2018-06-13T18:54:05

remove unused -v option for 'got log'

diff --git a/got/got.1 b/got/got.1
index 0e133f0..8ead4c5 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 v ] [ Fl f ] [ Ar repository-path ]
+.It Cm log [ Fl p ] [ Fl c Ar commit ] [ Fl l Ar N ] [ Fl f ] [ Ar repository-path ]
 Display history of a repository.
 If the
 .Ar repository path
@@ -109,8 +109,6 @@ Start traversing history at the specified
 The expected argument is the SHA1 hash which corresponds to the commit object.
 .It Fl l Ar N
 Limit history traversal to a given number of commits.
-.It Fl v
-Show verbose output.
 .It Fl f
 Restrict history traversal to the first parent of each commit.
 This shows the linear history of the current branch only.
diff --git a/got/got.c b/got/got.c
index 59821dd..61a7b2a 100644
--- a/got/got.c
+++ b/got/got.c
@@ -318,7 +318,7 @@ get_datestr(time_t *time, char *datebuf)
 
 static const struct got_error *
 print_commit(struct got_commit_object *commit, struct got_object_id *id,
-    struct got_repository *repo, int show_patch, int verbose)
+    struct got_repository *repo, int show_patch)
 {
 	const struct got_error *err = NULL;
 	char *id_str, *datestr, *logmsg, *line;
@@ -375,7 +375,7 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 
 static const struct got_error *
 print_commits(struct got_object *root_obj, struct got_object_id *root_id,
-    struct got_repository *repo, int show_patch, int limit, int verbose,
+    struct got_repository *repo, int show_patch, int limit,
     int first_parent_traversal)
 {
 	const struct got_error *err;
@@ -414,7 +414,7 @@ print_commits(struct got_object *root_obj, struct got_object_id *root_id,
 		err = got_object_open_as_commit(&commit, repo, id);
 		if (err)
 			return err;
-		err = print_commit(commit, id, repo, show_patch, verbose);
+		err = print_commit(commit, id, repo, show_patch);
 		got_object_commit_close(commit);
 		if (err || (limit && --limit == 0))
 			break;
@@ -442,7 +442,7 @@ cmd_log(int argc, char *argv[])
 	char *repo_path = NULL;
 	char *start_commit = NULL;
 	int ch;
-	int show_patch = 0, limit = 0, verbose = 0, first_parent_traversal = 0;
+	int show_patch = 0, limit = 0, first_parent_traversal = 0;
 	const char *errstr;
 
 #ifndef PROFILE
@@ -450,7 +450,7 @@ cmd_log(int argc, char *argv[])
 		err(1, "pledge");
 #endif
 
-	while ((ch = getopt(argc, argv, "pc:l:vf")) != -1) {
+	while ((ch = getopt(argc, argv, "pc:l:f")) != -1) {
 		switch (ch) {
 		case 'p':
 			show_patch = 1;
@@ -463,9 +463,6 @@ cmd_log(int argc, char *argv[])
 			if (errstr != NULL)
 				err(1, "-l option %s", errstr);
 			break;
-		case 'v':
-			verbose = 1;
-			break;
 		case 'f':
 			first_parent_traversal = 1;
 			break;
@@ -516,7 +513,7 @@ cmd_log(int argc, char *argv[])
 		return error;
 	if (got_object_get_type(obj) == GOT_OBJ_TYPE_COMMIT)
 		error = print_commits(obj, id, repo, show_patch, limit,
-		    verbose, first_parent_traversal);
+		    first_parent_traversal);
 	else
 		error = got_error(GOT_ERR_OBJ_TYPE);
 	got_object_close(obj);