Skip to content

Commit

Permalink
Blame: improve error messages for , operation
Browse files Browse the repository at this point in the history
This addresses a portion of jonas#1315.

Apart from being a bit clearer, the user will be able
to learn what `,` is meant to do from it. Trying to
press `,` a few times is a natural thing to try to
do after reading the help while trying to figure
out how blame works in tig.
  • Loading branch information
ilyagr committed Feb 13, 2024
1 parent e83bbbd commit 68537a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ blame_go_forward(struct view *view, struct blame *blame, bool parent)
const char *filename = parent ? commit->parent_filename : commit->filename;

if (!*id && parent) {
report("The selected commit has no parents");
report("Commit %.8s has no ancestors modifying the seleted line", commit->id);
return;
}

if (!strcmp(history_state->id, id) && !strcmp(history_state->filename, filename)) {
report("The selected commit is already displayed");
report("Commit %.8s is already beind displayed", commit->id);
return;
}

Expand Down

0 comments on commit 68537a9

Please sign in to comment.