mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
object: stop depending on the_repository
There are a couple of functions exposed by "object.c" that implicitly depend on `the_repository`. Remove this dependency by injecting the repository via a parameter. Adapt callers accordingly by simply using `the_repository`, except in cases where the subsystem is already free of the repository. In that case, we instead pass the repository provided by the caller's context. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
228457c9d9
commit
74d414c9f1
@@ -2468,7 +2468,7 @@ int cmd_format_patch(int argc,
|
||||
base = get_base_commit(&cfg, list, nr);
|
||||
if (base) {
|
||||
reset_revision_walk();
|
||||
clear_object_flags(UNINTERESTING);
|
||||
clear_object_flags(the_repository, UNINTERESTING);
|
||||
prepare_bases(&bases, base, list, nr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user