ctreemanifest: replace fetcher.get() calls in diffrecurse

Summary:
diffrecurse was still calling the fetcher directly. This caused it to not access
'resolved' manifests correctly in some cases. Let's change all uses to use
entry->get_manifest() which handles this stuff correctly.

Test Plan: Later patches worked

Reviewers: #fastmanifest

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3885016
This commit is contained in:
Durham Goode 2016-09-19 13:25:34 -07:00
parent f9d88db548
commit 8e46cac9f0

View File

@ -132,12 +132,10 @@ void treemanifest_diffrecurse(
selfentry->appendtopath(path);
if (selfbinnode != otherbinnode) {
Manifest *selfchildmanifest = fetcher.get(
path.c_str(), path.size(),
selfbinnode);
Manifest *otherchildmanifest = fetcher.get(
path.c_str(), path.size(),
otherbinnode);
Manifest *selfchildmanifest = selfentry->get_manifest(fetcher,
path.c_str(), path.size());
Manifest *otherchildmanifest = otherentry->get_manifest(fetcher,
path.c_str(), path.size());
treemanifest_diffrecurse(
selfchildmanifest,
@ -155,9 +153,8 @@ void treemanifest_diffrecurse(
entry.addtodiff(diff, path);
path.append(1, '/');
Manifest *selfchildmanifest = fetcher.get(
path.c_str(), path.size(),
selfbinnode);
Manifest *selfchildmanifest = selfentry->get_manifest(fetcher,
path.c_str(), path.size());
treemanifest_diffrecurse(selfchildmanifest, NULL, path, diff, fetcher);
selfiter.next();
@ -169,9 +166,8 @@ void treemanifest_diffrecurse(
entry.addtodiff(diff, path);
path.append(1, '/');
Manifest *otherchildmanifest = fetcher.get(
path.c_str(), path.size(),
otherbinnode
Manifest *otherchildmanifest = otherentry->get_manifest(fetcher,
path.c_str(), path.size()
);
treemanifest_diffrecurse(NULL, otherchildmanifest, path, diff, fetcher);