Merge branch 'nd/tree-walk-with-repo'

The tree-walk API learned to pass an in-core repository
instance throughout more codepaths.

* nd/tree-walk-with-repo:
  t7814: do not generate same commits in different repos
  Use the right 'struct repository' instead of the_repository
  match-trees.c: remove the_repo from shift_tree*()
  tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()
  tree-walk.c: remove the_repo from get_tree_entry()
  tree-walk.c: remove the_repo from fill_tree_descriptor()
  sha1-file.c: remove the_repo from read_object_with_reference()
This commit is contained in:
Junio C Hamano
2019-07-19 11:30:21 -07:00
26 changed files with 146 additions and 98 deletions

View File

@ -3302,7 +3302,7 @@ static int do_reset(struct repository *r,
return error_resolve_conflict(_(action_name(opts)));
}
if (!fill_tree_descriptor(&desc, &oid)) {
if (!fill_tree_descriptor(r, &desc, &oid)) {
error(_("failed to find tree of %s"), oid_to_hex(&oid));
rollback_lock_file(&lock);
free((void *)desc.buffer);
@ -3841,7 +3841,7 @@ static int pick_commits(struct repository *r,
unlink(rebase_path_author_script());
unlink(rebase_path_stopped_sha());
unlink(rebase_path_amend());
unlink(git_path_merge_head(the_repository));
unlink(git_path_merge_head(r));
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
if (item->command == TODO_BREAK) {
@ -4226,7 +4226,7 @@ static int commit_staged_changes(struct repository *r,
opts, flags))
return error(_("could not commit staged changes."));
unlink(rebase_path_amend());
unlink(git_path_merge_head(the_repository));
unlink(git_path_merge_head(r));
if (final_fixup) {
unlink(rebase_path_fixup_msg());
unlink(rebase_path_squash_msg());