commit - 756050ac401f1e724f0c1fd97af4a9855589c703
commit + 10aab77fd5164e672b109e74278bc080a7546fb8
blob - 4ec26b8962b911a5c478faf7aebc3d0686931d6e
blob + 765c5ecd53d258c8af195523d4fb1fea0c8f41d3
--- tog/tog.1
+++ tog/tog.1
This can then be used to open a new
.Cm log
view for arbitrary branches and tags.
+.It Cm @
+Toggle between showing the author and the committer name.
.El
.Pp
The options for
blob - a1c09fab6d16d0c21514c895128b7972db68d6c6
blob + 82d0b3a26a196343c75bd02c869e612c75190979
--- tog/tog.c
+++ tog/tog.c
struct commit_queue_entry *matched_entry;
struct commit_queue_entry *search_entry;
struct tog_colors colors;
+ int use_committer;
};
#define TOG_COLOR_DIFF_MINUS 1
goto done;
}
- author = strdup(got_object_commit_get_author(commit));
+ if (s->use_committer)
+ author = strdup(got_object_commit_get_committer(commit));
+ else
+ author = strdup(got_object_commit_get_author(commit));
if (author == NULL) {
err = got_error_from_errno("strdup");
goto done;
ncommits = 0;
view->maxx = 0;
while (entry) {
+ struct got_commit_object *c = entry->commit;
char *author, *eol, *msg, *msg0;
wchar_t *wauthor, *wmsg;
int width;
if (ncommits >= limit - 1)
break;
- author = strdup(got_object_commit_get_author(entry->commit));
+ if (s->use_committer)
+ author = strdup(got_object_commit_get_committer(c));
+ else
+ author = strdup(got_object_commit_get_author(c));
if (author == NULL) {
err = got_error_from_errno("strdup");
goto done;
author_cols = width;
free(wauthor);
free(author);
- err = got_object_commit_get_logmsg(&msg0, entry->commit);
+ err = got_object_commit_get_logmsg(&msg0, c);
if (err)
goto done;
msg = msg0;
case CTRL('n'):
err = log_move_cursor_down(view, 0);
break;
+ case '@':
+ s->use_committer = !s->use_committer;
+ break;
case 'G':
case KEY_END: {
/* We don't know yet how many commits, so we're forced to