commit - 405a764ee602920b95cbb4a7cb4410f1b78efea7
commit + dab5fe87a4baf0794fd02a8e5ad27561b107ea2a
blob - 54674805bc2ad0b54c4592914c85b28726a3073c
blob + 8349fe901e4e5ed535a8b09f924f0e8898d84015
--- got/got.c
+++ got/got.c
printf("-----------------------------------------------\n");
printf("commit %s\n", id_str);
free(id_str);
- datestr = get_datestr(&author_time, datebuf);
- printf("author: %s %s UTC\n", commit->author, datestr);
- if (strcmp(commit->author, commit->committer) != 0 ||
- author_time != committer_time) {
- datestr = get_datestr(&committer_time, datebuf);
- printf("committer: %s %s UTC\n", commit->committer, datestr);
- }
+ datestr = get_datestr(&committer_time, datebuf);
+ printf("from: %s\n", commit->committer);
+ printf("date: %s UTC\n", datestr);
+ if (strcmp(commit->author, commit->committer) != 0)
+ printf("original author: %s\n", commit->author);
if (commit->nparents > 1) {
struct got_object_qid *qid;
int n = 1;
blob - 39132fae6539fc190627024b2f89961b325613fa
blob + a06d2b0cbf3abb882002f9c1f628fd88881f18e3
--- lib/diff.c
+++ lib/diff.c
}
free(id_str);
time = mktime(&commit2->tm_author);
- if (fprintf(outfile, "author: %s %s UTC\n", commit2->author,
+ if (fprintf(outfile, "from: %s\n", commit2->author) < 0) {
+ err = got_error_from_errno();
+ goto done;
+ }
+ if (fprintf(outfile, "date: %s UTC\n",
get_datestr(&time, datebuf)) < 0) {
err = got_error_from_errno();
goto done;
}
time = mktime(&commit2->tm_committer);
if (strcmp(commit2->author, commit2->committer) != 0 &&
- fprintf(outfile, "committer: %s %s UTC\n", commit2->committer,
- get_datestr(&time, datebuf)) < 0) {
+ fprintf(outfile, "original author: %s\n", commit2->committer) < 0) {
err = got_error_from_errno();
goto done;
}