From 3bdbba9aef3a4945f9e3ee93162579b05e64e900 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 4 Apr 2008 01:43:26 +0200 Subject: [PATCH] Error out when starting up in empty main or blame view This usually means that the arguments did not match any revisions or file. --- tig.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tig.c b/tig.c index 7ca509c..04c607f 100644 --- a/tig.c +++ b/tig.c @@ -3488,6 +3488,8 @@ blame_read_file(struct view *view, char *line) if (view->lines > 0) pipe = popen(view->cmd, "r"); + else if (!view->parent) + die("No blame exist for %s", view->vid); view->cmd[0] = 0; if (!pipe) { report("Failed to load blame data"); @@ -4947,6 +4949,8 @@ main_read(struct view *view, char *line) struct commit *commit; if (!line) { + if (!view->lines && !view->parent) + die("No revisions match the given arguments."); update_rev_graph(graph); return TRUE; } -- 2.30.2