diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-06-27 09:28:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-27 19:45:17 (GMT) |
commit | 34e7771bc64475d71430c20937f6828675ebccdb (patch) | |
tree | 9e8d674ecfcc2d08334cb79354781d63a30c9864 /sha1-name.c | |
parent | 90d3405196cfe5d3c63185a33dcee57fb6ea7e8a (diff) | |
download | git-34e7771bc64475d71430c20937f6828675ebccdb.zip git-34e7771bc64475d71430c20937f6828675ebccdb.tar.gz git-34e7771bc64475d71430c20937f6828675ebccdb.tar.bz2 |
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>
Diffstat (limited to 'sha1-name.c')
-rw-r--r-- | sha1-name.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sha1-name.c b/sha1-name.c index 3c9fa10..6069fe0 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -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 { |