Commit Diff


commit - c0768b0f89920979c9b7285843f58311d618264f
commit + ef530fe5a13f28305075dd1aa38b42123d5a9929
blob - 34977194ae28b73fef4ee4902fd621efaa92ef12
blob + f802293afab7359d003a267697fd2e2caac820e7
--- lib/got_lib_privsep.h
+++ lib/got_lib_privsep.h
@@ -99,7 +99,9 @@ struct got_imsg_object {
 struct got_imsg_commit_object {
 	uint8_t tree_id[SHA1_DIGEST_LENGTH];
 	size_t author_len;
+	time_t author_time;
 	size_t committer_len;
+	time_t committer_time;
 	size_t logmsg_len;
 	int nparents;
 
blob - b542a8d8493a8740e0a95f43ba093ec43ecd36e7
blob + c4ef6561af19d2462cd56d5d2488327900195e42
--- lib/privsep.c
+++ lib/privsep.c
@@ -266,7 +266,9 @@ got_privsep_send_commit(struct imsgbuf *ibuf, struct g
 
 	memcpy(icommit.tree_id, commit->tree_id->sha1, sizeof(icommit.tree_id));
 	icommit.author_len = strlen(commit->author);
+	icommit.author_time = commit->author_time;
 	icommit.committer_len = strlen(commit->committer);
+	icommit.committer_time = commit->committer_time;
 	icommit.logmsg_len = strlen(commit->logmsg);
 	icommit.nparents = commit->nparents;
 
@@ -366,6 +368,7 @@ got_privsep_recv_commit(struct got_commit_object **com
 				err = got_error_from_errno();
 				break;
 			}
+			(*commit)->author_time = 0;
 		} else {
 			(*commit)->author = malloc(icommit.author_len + 1);
 			if ((*commit)->author == NULL) {
@@ -375,6 +378,7 @@ got_privsep_recv_commit(struct got_commit_object **com
 			memcpy((*commit)->author, data + len,
 			    icommit.author_len);
 			(*commit)->author[icommit.author_len] = '\0';
+			(*commit)->author_time = icommit.author_time;
 		}
 		len += icommit.author_len;
 
@@ -384,6 +388,7 @@ got_privsep_recv_commit(struct got_commit_object **com
 				err = got_error_from_errno();
 				break;
 			}
+			(*commit)->committer_time = 0;
 		} else {
 			(*commit)->committer =
 			    malloc(icommit.committer_len + 1);
@@ -394,6 +399,7 @@ got_privsep_recv_commit(struct got_commit_object **com
 			memcpy((*commit)->committer, data + len,
 			    icommit.committer_len);
 			(*commit)->committer[icommit.committer_len] = '\0';
+			(*commit)->committer_time = icommit.committer_time;
 		}
 		len += icommit.committer_len;