pretty: allow %(trailers) options with explicit value
[gitweb.git] / builtin / am.c
index 5e643e2a3e3d70d9c674d3edab2eb1f2f08f3392..3ee9a9d2a92aaa0e9716719640deaec7e260c811 100644 (file)
@@ -1376,7 +1376,7 @@ static void write_commit_patch(const struct am_state *state, struct commit *comm
        FILE *fp;
 
        fp = xfopen(am_path(state, "patch"), "w");
-       init_revisions(&rev_info, NULL);
+       repo_init_revisions(the_repository, &rev_info, NULL);
        rev_info.diff = 1;
        rev_info.abbrev = 0;
        rev_info.disable_stdin = 1;
@@ -1411,7 +1411,7 @@ static void write_index_patch(const struct am_state *state)
                                   the_repository->hash_algo->empty_tree);
 
        fp = xfopen(am_path(state, "patch"), "w");
-       init_revisions(&rev_info, NULL);
+       repo_init_revisions(the_repository, &rev_info, NULL);
        rev_info.diff = 1;
        rev_info.disable_stdin = 1;
        rev_info.no_commit_id = 1;
@@ -1569,7 +1569,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
                struct rev_info rev_info;
                const char *diff_filter_str = "--diff-filter=AM";
 
-               init_revisions(&rev_info, NULL);
+               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);
                add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
@@ -1608,7 +1608,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
                o.verbosity = 0;
 
        if (merge_recursive_generic(&o, &our_tree, &their_tree, 1, bases, &result)) {
-               rerere(state->allow_rerere_autoupdate);
+               repo_rerere(the_repository, state->allow_rerere_autoupdate);
                free(their_tree_name);
                return error(_("Failed to merge in the changes."));
        }
@@ -1903,7 +1903,7 @@ static void am_resolve(struct am_state *state)
                        goto next;
        }
 
-       rerere(0);
+       repo_rerere(the_repository, 0);
 
        do_commit(state);
 
@@ -2328,7 +2328,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
        /* Ensure a valid committer ident can be constructed */
        git_committer_info(IDENT_STRICT);
 
-       if (read_index_preload(&the_index, NULL) < 0)
+       if (read_index_preload(&the_index, NULL, 0) < 0)
                die(_("failed to read the index"));
 
        if (in_progress) {