From: Jonas Fonseca Date: Thu, 3 Apr 2008 23:43:26 +0000 (+0200) Subject: Error out when starting up in empty main or blame view X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3bdbba9aef3a4945f9e3ee93162579b05e64e900;p=tig.git Error out when starting up in empty main or blame view This usually means that the arguments did not match any revisions or file. --- 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; }