Skip to content

Commit 62ff0fb

Browse files
committed
Blame: improve error messages for the , operation
The message is now: Commit f4657f0 has no ancestors modifying the seleted line instead of The selected commit has no parents 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.
1 parent e83bbbd commit 62ff0fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blame.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,12 @@ blame_go_forward(struct view *view, struct blame *blame, bool parent)
355355
const char *filename = parent ? commit->parent_filename : commit->filename;
356356

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

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

0 commit comments

Comments
 (0)