mirror of
https://github.com/git/git.git
synced 2026-08-09 01:21:47 +00:00
setup: stop using the_repository in initialize_repository_version()
Stop using `the_repository` in `initialize_repository_version()` and instead accept the repository as a parameter. The injection of `the_repository` is thus bumped one level higher, where callers now pass it in explicitly. 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
602254dfb0
commit
779fbcd9eb
@@ -1229,7 +1229,7 @@ int cmd_clone(int argc,
|
||||
*
|
||||
* This is sufficient for Git commands to discover the Git directory.
|
||||
*/
|
||||
initialize_repository_version(GIT_HASH_UNKNOWN,
|
||||
initialize_repository_version(the_repository, GIT_HASH_UNKNOWN,
|
||||
the_repository->ref_storage_format, 1);
|
||||
|
||||
refs_create_refdir_stubs(the_repository, git_dir, NULL);
|
||||
@@ -1442,7 +1442,7 @@ int cmd_clone(int argc,
|
||||
* ours to the same thing.
|
||||
*/
|
||||
hash_algo = hash_algo_by_ptr(transport_get_hash_algo(transport));
|
||||
initialize_repository_version(hash_algo, the_repository->ref_storage_format, 1);
|
||||
initialize_repository_version(the_repository, hash_algo, the_repository->ref_storage_format, 1);
|
||||
repo_set_hash_algo(the_repository, hash_algo);
|
||||
create_reference_database(NULL, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user