summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 351917f)
raw | patch | inline | side by side (parent: 351917f)
author | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 17 Aug 2007 21:59:37 +0000 (23:59 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 17 Aug 2007 21:59:37 +0000 (23:59 +0200) |
tig.c | patch | blob | history |
index 0a42ee2fa8cbe93d9c86074159fb41bb7ed9d4e2..50fbaa7e494e9b5aeed283e10df3feca97a79fa9 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3139,7 +3139,6 @@ status_update_file(struct view *view, struct status *status, enum line_type type
if (written != bufsize)
return FALSE;
- open_view(view, REQ_VIEW_STATUS, OPEN_RELOAD);
return TRUE;
}
assert(view->lines);
if (!line->data) {
- report("No file has been chosen");
- return;
- }
+ if (line[1].type == LINE_STAT_NONE) {
+ report("Nothing to update");
+ return;
+ }
- if (!status_update_file(view, line->data, line->type))
+ while (++line < view->line + view->lines && line->data) {
+ if (!status_update_file(view, line->data, line->type))
+ report("Failed to update file status");
+ }
+
+ } else if (!status_update_file(view, line->data, line->type)) {
report("Failed to update file status");
+ }
+
+ open_view(view, REQ_VIEW_STATUS, OPEN_RELOAD);
} else {
report("This action is only valid for the status view");
}