Merge branch 'va/i18n-even-more'
[gitweb.git] / builtin / apply.c
index ecb7f1b258cb802c934dc37f8d6af511e7b33ed1..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);
                }
        }
 
@@ -4667,6 +4667,9 @@ static void init_apply_state(struct apply_state *state,
        state->ws_error_action = warn_on_ws_error;
        state->ws_ignore_action = ignore_ws_none;
        state->linenr = 1;
+       string_list_init(&state->fn_table, 0);
+       string_list_init(&state->limit_by_name, 0);
+       string_list_init(&state->symlink_changes, 0);
        strbuf_init(&state->root, 0);
 
        git_apply_config();