Code

Do not reload status and stage views on errors
authorJonas Fonseca <fonseca@diku.dk>
Thu, 10 Apr 2008 21:45:03 +0000 (23:45 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Thu, 10 Apr 2008 21:45:03 +0000 (23:45 +0200)
It hides the error message.

tig.c

diff --git a/tig.c b/tig.c
index a3d22320943ac45ecb2dc738868d2d7629096a0b..83523de419bc34c1036a014881bb3629f7d8c52d 100644 (file)
--- 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: