Commit 6ede4e7aa51a4364ca5b52614fa38a281cc0e736

Stefan Sperling 2018-06-11T02:20:38

fix check for author != committer in 'got log'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/got/got.c b/got/got.c
index d9d771d..82edaba 100644
--- a/got/got.c
+++ b/got/got.c
@@ -334,7 +334,9 @@ print_commit(struct got_commit_object *commit, struct got_object_id *id,
 	datestr = get_datestr(&commit->author_time, datebuf);
 	printf("author: %s  %s %s\n", commit->author, datestr,
 	    commit->author_tzoff);
-	if (strcmp(commit->author, commit->committer) != 0) {
+	if (strcmp(commit->author, commit->committer) != 0 ||
+	    commit->author_time != commit->committer_time ||
+	    strcmp(commit->author_tzoff, commit->committer_tzoff) != 0) {
 		datestr = get_datestr(&commit->committer_time, datebuf);
 		printf("committer: %s  %s %s\n", commit->committer,
 		    datestr, commit->committer_tzoff);