Use the right 'struct repository' instead of the_repository

There are a couple of places where 'struct repository' is already passed
around, but the_repository is still used. Use the right repo.

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:
Nguyễn Thái Ngọc Duy
2019-06-27 16:28:52 +07:00
committed by Junio C Hamano
parent 90d3405196
commit 34e7771bc6
4 changed files with 26 additions and 22 deletions

View File

@ -478,7 +478,7 @@ static enum get_oid_result get_short_oid(struct repository *r,
* or migrated from loose to packed.
*/
if (status == MISSING_OBJECT) {
reprepare_packed_git(the_repository);
reprepare_packed_git(r);
find_short_object_filename(&ds);
find_short_packed_object(&ds);
status = finish_object_disambiguation(&ds, oid);
@ -1389,9 +1389,7 @@ int repo_get_oid_mb(struct repository *r,
two = lookup_commit_reference_gently(r, &oid_tmp, 0);
if (!two)
return -1;
if (r != the_repository)
BUG("sorry get_merge_bases() can't take struct repository yet");
mbs = get_merge_bases(one, two);
mbs = repo_get_merge_bases(r, one, two);
if (!mbs || mbs->next)
st = -1;
else {