Commit Diff


commit - 4626e416306921d48e15bacb31618804cf08c252
commit + c0768b0f89920979c9b7285843f58311d618264f
blob - 2d95db6d10ae667414a0bdd5a37904712901b380
blob + 11a84bd689e01e9ce5c9b228a1b01f383f93dc7e
--- got/got.c
+++ got/got.c
@@ -17,6 +17,7 @@
 
 #include <sys/queue.h>
 #include <sys/limits.h>
+#include <sys/types.h>
 
 #include <err.h>
 #include <errno.h>
@@ -26,6 +27,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <libgen.h>
+#include <time.h>
 
 #include "got_error.h"
 #include "got_object.h"
@@ -318,9 +320,10 @@ print_commit(struct got_commit_object *commit, struct 
 	printf("-----------------------------------------------\n");
 	printf("commit %s\n", id_str);
 	free(id_str);
-	printf("author: %s\n", commit->author);
+	printf("author: %s  %s", commit->author, ctime(&commit->author_time));
 	if (strcmp(commit->author, commit->committer) != 0)
-		printf("committer: %s\n", commit->committer);
+		printf("committer: %s  %s\n", commit->committer,
+		    ctime(&commit->committer_time));
 	if (commit->nparents > 1) {
 		struct got_parent_id *pid;
 		int n = 1;