revision.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
26d024ecf0
commit
2abf350385
@ -1372,7 +1372,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;
|
||||
@ -1407,7 +1407,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;
|
||||
@ -1565,7 +1565,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);
|
||||
|
Reference in New Issue
Block a user