From 3003363eb7109d0b25a2ef32615119be0669a2e9 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 10 Apr 2008 23:45:03 +0200 Subject: [PATCH] Do not reload status and stage views on errors It hides the error message. --- tig.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tig.c b/tig.c index a3d2232..83523de 100644 --- a/tig.c +++ b/tig.c @@ -4303,11 +4303,14 @@ status_update(struct view *view) return FALSE; } - if (!status_update_files(view, line + 1)) + if (!status_update_files(view, line + 1)) { report("Failed to update file status"); + return FALSE; + } } else if (!status_update_file(line->data, line->type)) { report("Failed to update file status"); + return FALSE; } return TRUE; @@ -4558,7 +4561,8 @@ stage_request(struct view *view, enum request request, struct line *line) { switch (request) { case REQ_STATUS_UPDATE: - stage_update(view, line); + if (!stage_update(view, line)) + return REQ_NONE; break; case REQ_EDIT: -- 2.30.2