merge-recursive: flush output buffer before printing error messages
[gitweb.git] / builtin / apply.c
index 7fc5c3e30745d50a05accb3a83ccfa8871963df6..1a488f9e888b6e9ebb1357a6cf3f7f007cf732fe 100644 (file)
@@ -3359,7 +3359,7 @@ static int load_patch_target(struct apply_state *state,
 {
        if (state->cached || state->check_index) {
                if (read_file_or_gitlink(ce, buf))
-                       return error(_("read of %s failed"), name);
+                       return error(_("failed to read %s"), name);
        } else if (name) {
                if (S_ISGITLINK(expected_mode)) {
                        if (ce)
@@ -3370,7 +3370,7 @@ static int load_patch_target(struct apply_state *state,
                        return error(_("reading from '%s' beyond a symbolic link"), name);
                } else {
                        if (read_old_data(st, name, buf))
-                               return error(_("read of %s failed"), name);
+                               return error(_("failed to read %s"), name);
                }
        }
        return 0;
@@ -3416,7 +3416,7 @@ static int load_preimage(struct apply_state *state,
                        free_fragment_list(patch->fragments);
                        patch->fragments = NULL;
                } else if (status) {
-                       return error(_("read of %s failed"), patch->old_name);
+                       return error(_("failed to read %s"), patch->old_name);
                }
        }