revisions API users: add straightforward release_revisions()
Add a release_revisions() to various users of "struct rev_list" in those straightforward cases where we only need to add the release_revisions() call to the end of a block, and don't need to e.g. refactor anything to use a "goto cleanup" pattern. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1878b5edc0
commit
2108fe4a19
@ -1397,6 +1397,7 @@ static void write_commit_patch(const struct am_state *state, struct commit *comm
|
||||
add_pending_object(&rev_info, &commit->object, "");
|
||||
diff_setup_done(&rev_info.diffopt);
|
||||
log_tree_commit(&rev_info, commit);
|
||||
release_revisions(&rev_info);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1429,6 +1430,7 @@ static void write_index_patch(const struct am_state *state)
|
||||
add_pending_object(&rev_info, &tree->object, "");
|
||||
diff_setup_done(&rev_info.diffopt);
|
||||
run_diff_index(&rev_info, 1);
|
||||
release_revisions(&rev_info);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1582,6 +1584,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
|
||||
add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
|
||||
diff_setup_done(&rev_info.diffopt);
|
||||
run_diff_index(&rev_info, 1);
|
||||
release_revisions(&rev_info);
|
||||
}
|
||||
|
||||
if (run_apply(state, index_path))
|
||||
|
Reference in New Issue
Block a user