commit - a7f401481103db5234cf9470bd29b4d1f133a4a2
commit + 69efd4c49901a7b626009976256a4b3af8de7c4e
blob - a5af6acedcd7c31ac6cf0617ce8de7ce91accbc0
blob + bb381a1277bd556ea87ab86851b8849757982323
--- tog/tog.1
+++ tog/tog.1
Enter the currently selected directory, or switch to the
.Cm blame
view for the currently selected file.
+.It Cm l
+Switch to the
+.Cm log
+view for the currently selected tree entry.
.It Cm Backspace
Move back to the parent directory.
.It Cm i
blob - 44dca03e388ab7b8ad702f0f77f21ec330f24620
blob + 990602888133f25a73e5e50b15b231c68f9df59f
--- tog/tog.c
+++ tog/tog.c
{
const struct got_error *err = NULL;
char *path;
-
+
err = tree_entry_path(&path, parents, te);
if (err)
return err;
err = show_blame_view(path, commit_id, repo);
+ free(path);
+ return err;
+}
+
+static const struct got_error *
+log_tree_entry(struct got_tree_entry *te, struct tog_parent_trees *parents,
+ struct got_object_id *commit_id, struct got_repository *repo)
+{
+ const struct got_error *err = NULL;
+ char *path;
+
+ err = tree_entry_path(&path, parents, te);
+ if (err)
+ return err;
+
+ err = show_log_view(commit_id, repo, path);
free(path);
return err;
}
break;
case 'i':
show_ids = !show_ids;
+ break;
+ case 'l':
+ if (selected_entry) {
+ err = log_tree_entry(selected_entry,
+ &parents, commit_id, repo);
+ if (err)
+ goto done;
+ }
break;
case 'k':
case KEY_UP: