commit - bfbb258b77efcda05d51b22c11c23c2b94c3cf05
commit + a9da0816e28f2d7d6dbd3582ce02214e5c772501
blob - 717a7c74d145e56db2a81a960f1739187059af09
blob + c000d1047d7b2bd91e7015e05e3443279216305b
--- got/got.c
+++ got/got.c
committer = got_object_commit_get_committer(commit);
committer_time = got_object_commit_get_committer_time(commit);
printf("from: %s\n", author);
- if (author_time != committer_time)
- print_date("orig:", &author_time);
if (strcmp(author, committer) != 0)
printf("via: %s\n", committer);
print_date("date:", &committer_time);
+ if (author_time != committer_time)
+ print_date("orig:", &author_time);
/* parent commits */
if (got_object_commit_get_nparents(commit) > 1) {
blob - 5289fe88e2afd9cf2bdc043d4722c21fa4843071
blob + 6f62269b5db678a60f947bec3954fb82ba0cd2a4
--- tog/tog.c
+++ tog/tog.c
if (err)
goto done;
+ /* author and committer data */
author = got_object_commit_get_author(commit);
author_time = got_object_commit_get_author_time(commit);
committer = got_object_commit_get_committer(commit);
err = add_line_metadata(lines, nlines, outoff, GOT_DIFF_LINE_AUTHOR);
if (err)
goto done;
- if (author_time != committer_time) {
- err = write_date(lines, nlines, "orig:", &author_time, outfile,
- &outoff);
- if (err)
- goto done;
- }
if (strcmp(author, committer) != 0) {
n = fprintf(outfile, "via: %s\n", committer);
if (n < 0) {
&outoff);
if (err)
goto done;
+ if (author_time != committer_time) {
+ err = write_date(lines, nlines, "orig:", &author_time, outfile,
+ &outoff);
+ if (err)
+ goto done;
+ }
+
+ /* parent commits */
if (got_object_commit_get_nparents(commit) > 1) {
const struct got_object_id_queue *parent_ids;
struct got_object_qid *qid;