commit 32c73ca458e21536a20a64dc160fa38d92029cce from: Sven M. Hallberg date: Mon Jun 16 13:40:27 2025 UTC tog log: show author dates if showing author names (@) commit - e339aba5a8f332c98d0fa01f1d9a5096e89c6045 commit + 32c73ca458e21536a20a64dc160fa38d92029cce blob - 0ccc6a0f788f55d0c7f1bd60778f977402cfd4d8 blob + 4251aa564ea993a3f0dd5ffc945f42dc28d5ce18 --- tog/tog.c +++ tog/tog.c @@ -622,7 +622,7 @@ struct tog_help_view_state { " commit"), \ KEY_("m", "Mark or unmark the selected entry for diffing with the " \ "next selected commit"), \ - KEY_("@", "Toggle between displaying author and committer name"), \ + KEY_("@", "Toggle between displaying author and committer data"), \ KEY_("&", "Open prompt to enter term to limit commits displayed"), \ KEY_("C-g Backspace", "Cancel current search or log operation"), \ KEY_("C-l", "Reload the log view with new repository commits or " \ @@ -2723,7 +2723,7 @@ draw_commit(struct tog_view *view, struct commit_queue wchar_t *wrefstr = NULL, *wlogmsg = NULL; int refstr_width, logmsg_width, col, limit, scrollx, logmsg_x; const int avail = view->ncols, marker_column = author_display_cols + 1; - time_t committer_time; + time_t timestamp; struct got_reflist_head *refs; if (tog_base_commit.id != NULL && tog_base_commit.idx == -1 && @@ -2737,8 +2737,11 @@ draw_commit(struct tog_view *view, struct commit_queue return got_error_set_errno(rc, "pthread_cond_wait"); } - committer_time = got_object_commit_get_committer_time(commit); - err = draw_ymd(view, committer_time, &col, avail, date_display_cols); + if (s->use_committer) + timestamp = got_object_commit_get_committer_time(commit); + else + timestamp = got_object_commit_get_author_time(commit); + err = draw_ymd(view, timestamp, &col, avail, date_display_cols); if (err != NULL) return err; if (col > avail)