From 8227054299f820435b1ddfd04c42c3daccc3168f Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 28 Dec 2008 12:32:12 -0500 Subject: [PATCH] Refuse to open blame view for all non-file entries in the tree view --- NEWS | 1 + tig.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.30.2