Re: [PATCH v2 00/94] libify apply and use lib in am

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 12, 2016 at 9:04 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> As Christian said in 00/94, this probably needs to go in steps, as I
> do not think anybody wants to review fouteen rounds of 90+ patch
> series.  I thought the early 40+ patches in the series were at least
> cursory reviewed already?

Yeah, Stefan said he was ok to give his Reviewed-by to v1 patches 01
to 47 and they haven't changed much from v1 to v2.

Here is the diff for those patches:

> git diff 57be628 66c994d
diff --git a/builtin/apply.c b/builtin/apply.c
index 787426f..67c64a5 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -67,13 +67,15 @@ struct apply_state {
        /* --numstat does numeric diffstat, and doesn't actually apply */
        int numstat;

-       const char *fake_ancestor;
-
        int summary;
-
        int threeway;
-
        int no_add;
+       const char *fake_ancestor;
+       const char *patch_input_file;
+       struct string_list limit_by_name;
+       int has_include;
+       struct strbuf root;
+       struct string_list symlink_changes;

        /*
         *  --check turns on checking that the working tree matches the
@@ -85,11 +87,8 @@ struct apply_state {
        int check_index;

        int unidiff_zero;
-
        int update_index;
-
        int unsafe_paths;
-
        int line_termination;

        /*
@@ -113,19 +112,10 @@ struct apply_state {
         */
        struct string_list fn_table;

-       struct string_list symlink_changes;
-
        int p_value;
        int p_value_known;
        unsigned int p_context;

-       const char *patch_input_file;
-
-       struct string_list limit_by_name;
-       int has_include;
-
-       struct strbuf root;
-
        const char *whitespace_option;
        int whitespace_error;
        int squelch_whitespace_errors;
@@ -1626,7 +1616,7 @@ static void record_ws_error(struct apply_state *state,
                            unsigned result,
                            const char *line,
                            int len,
-                           int l_nr)
+                           int linenr)
 {
        char *err;

@@ -1640,7 +1630,7 @@ static void record_ws_error(struct apply_state *state,

        err = whitespace_error_string(result);
        fprintf(stderr, "%s:%d: %s.\n%.*s\n",
-               state->patch_input_file, l_nr, err, len, line);
+               state->patch_input_file, linenr, err, len, line);
        free(err);
 }

@@ -2445,7 +2435,7 @@ static int match_fragment(struct apply_state *state,
                          int match_beginning, int match_end)
 {
        int i;
-       char *fixed_buf, *orig, *target;
+       char *fixed_buf, *buf, *orig, *target;
        struct strbuf fixed;
        size_t fixed_len, postlen;
        int preimage_limit;
@@ -2506,7 +2496,6 @@ static int match_fragment(struct apply_state *state,
                 * There must be one non-blank context line that match
                 * a line before the end of img.
                 */
-               char *buf;
                char *buf_end;

                buf = preimage->buf;
@@ -4670,10 +4659,10 @@ static int option_parse_directory(const struct
option *opt,
        return 0;
 }

-static void init_apply_state(struct apply_state *state, const char *prefix_)
+static void init_apply_state(struct apply_state *state, const char *prefix)
 {
        memset(state, 0, sizeof(*state));
-       state->prefix = prefix_;
+       state->prefix = prefix;
        state->prefix_length = state->prefix ? strlen(state->prefix) : 0;
        state->apply = 1;
        state->line_termination = '\n';
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]