From: Jonas Fonseca Date: Sun, 28 Dec 2008 17:32:12 +0000 (-0500) Subject: Refuse to open blame view for all non-file entries in the tree view X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8227054299f820435b1ddfd04c42c3daccc3168f;p=tig.git Refuse to open blame view for all non-file entries in the tree view --- diff --git a/NEWS b/NEWS index 5e2cae8..4d91c7e 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ Bug fixes: - Main view: fix redrawing of the last commit wrt. the revision graph. - Fix waiting for input after executing a run request in pager mode. - Status & stage view: refuse to open directories and deleted files. + - Tree view: show error when requesting blame for all non-file entries. tig-0.12.1 ---------- diff --git a/tig.c b/tig.c index db6bde6..6f25bec 100644 --- a/tig.c +++ b/tig.c @@ -3365,8 +3365,8 @@ tree_request(struct view *view, enum request request, struct line *line) if (request == REQ_VIEW_BLAME) { const char *filename = tree_path(line); - if (line->type == LINE_TREE_DIR) { - report("Cannot show blame for directory %s", opt_path); + if (line->type != LINE_TREE_FILE) { + report("Blame only supported for files"); return REQ_NONE; }