Commit 33d869be77b0c87421075910bfadc9bce91a7a82

Stefan Sperling 2018-12-22T12:44:02

undo previous; indentation is enough to avoid parsing problems

diff --git a/got/got.c b/got/got.c
index 8e6e385..b4d4bc1 100644
--- a/got/got.c
+++ b/got/got.c
@@ -339,17 +339,6 @@ get_datestr(time_t *time, char *datebuf)
 	return s;
 }
 
-static int
-count_lines(char *s)
-{
-	int nlines = 0;
-	while (*s) {
-		if (*s++ == '\n')
-			nlines++;
-	}
-	return nlines;
-}
-
 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 diff_context)
@@ -357,17 +346,12 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 	const struct got_error *err = NULL;
 	char *id_str, *datestr, *logmsg0, *logmsg, *line;
 	char datebuf[26];
-	int nlines = 3 + commit->nparents - 1;
-
-	if (strcmp(commit->author, commit->committer) != 0)
-		nlines++;
-	nlines += count_lines(commit->logmsg);
 
 	err = got_object_id_str(&id_str, id);
 	if (err)
 		return err;
 
-	printf("----------------------------------------------- %d\n", nlines);
+	printf("-----------------------------------------------\n");
 	printf("commit %s\n", id_str);
 	free(id_str);
 	printf("from: %s\n", commit->author);