Code

Refuse to open blame view for all non-file entries in the tree view
[tig.git] / tig.c
diff --git a/tig.c b/tig.c
index db6bde69f1b8062fd0b45f306d12c762b87fc631..6f25bec53f3435f7c6fb82068edd00ec318a64cd 100644 (file)
--- 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;
                }