Merge branch 'jk/server-info-rabbit-hole'
[gitweb.git] / builtin / am.c
index 58a2aef28bbcd715660422dc37042e79d4d350c1..3ba5723c2c8ff9bf27e7d3fa8f03a79b37d2a89d 100644 (file)
@@ -453,6 +453,7 @@ static int run_post_rewrite_hook(const struct am_state *state)
 
        cp.in = xopen(am_path(state, "rewritten"), O_RDONLY);
        cp.stdout_to_stderr = 1;
+       cp.trace2_hook_name = "post-rewrite";
 
        ret = run_command(&cp);
 
@@ -1500,11 +1501,11 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
                 * review them with extra care to spot mismerges.
                 */
                struct rev_info rev_info;
-               const char *diff_filter_str = "--diff-filter=AM";
 
                repo_init_revisions(the_repository, &rev_info, NULL);
                rev_info.diffopt.output_format = DIFF_FORMAT_NAME_STATUS;
-               diff_opt_parse(&rev_info.diffopt, &diff_filter_str, 1, rev_info.prefix);
+               rev_info.diffopt.filter |= diff_filter_bit('A');
+               rev_info.diffopt.filter |= diff_filter_bit('M');
                add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
                diff_setup_done(&rev_info.diffopt);
                run_diff_index(&rev_info, 1);
@@ -1579,6 +1580,7 @@ static void do_commit(const struct am_state *state)
        }
 
        author = fmt_ident(state->author_name, state->author_email,
+               WANT_AUTHOR_IDENT,
                        state->ignore_date ? NULL : state->author_date,
                        IDENT_STRICT);
 
@@ -2119,6 +2121,10 @@ static int parse_opt_patchformat(const struct option *opt, const char *arg, int
                *opt_value = PATCH_FORMAT_HG;
        else if (!strcmp(arg, "mboxrd"))
                *opt_value = PATCH_FORMAT_MBOXRD;
+       /*
+        * Please update $__git_patchformat in git-completion.bash
+        * when you add new options
+        */
        else
                return error(_("Invalid value for --patch-format: %s"), arg);
        return 0;