commit - 60b94e7d2a2d0fd6dc815d562ee11ba673819a7c
commit + f69c5a468f5e08db053b390fc00d2e2e70bf4d53
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 - 3bc621c521f234691dee4e06c4349babd8903aa3
blob + 243bc3031c43c95c8bb3942763da45e096287e66
--- 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