Skip to content

Commit 97ff2ed

Browse files
committed
Sync tarball cache within tarball cache Activity
1 parent d0f8a92 commit 97ff2ed

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/libfetchers/github.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,12 @@ struct GitArchiveInputScheme : InputScheme
261261
auto tarballCache = getTarballCache();
262262
auto parseSink = tarballCache->getFileSystemObjectSink();
263263
auto lastModified = unpackTarfileToSink(archive, *parseSink);
264+
auto tree = parseSink->sync();
264265

265266
act.reset();
266267

267268
TarballInfo tarballInfo {
268-
.treeHash = tarballCache->dereferenceSingletonDirectory(parseSink->sync()),
269+
.treeHash = tarballCache->dereferenceSingletonDirectory(tree),
269270
.lastModified = lastModified
270271
};
271272

src/libfetchers/tarball.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ static DownloadTarballResult downloadTarball_(
170170
auto tarballCache = getTarballCache();
171171
auto parseSink = tarballCache->getFileSystemObjectSink();
172172
auto lastModified = unpackTarfileToSink(archive, *parseSink);
173+
auto tree = parseSink->sync();
173174

174175
act.reset();
175176

@@ -184,7 +185,7 @@ static DownloadTarballResult downloadTarball_(
184185
} else {
185186
infoAttrs.insert_or_assign("etag", res->etag);
186187
infoAttrs.insert_or_assign("treeHash",
187-
tarballCache->dereferenceSingletonDirectory(parseSink->sync()).gitRev());
188+
tarballCache->dereferenceSingletonDirectory(tree).gitRev());
188189
infoAttrs.insert_or_assign("lastModified", uint64_t(lastModified));
189190
if (res->immutableUrl)
190191
infoAttrs.insert_or_assign("immutableUrl", *res->immutableUrl);

0 commit comments

Comments
 (0)