Skip to content

Commit 65e608e

Browse files
fix: add missing export to http package (#6)
1 parent e7afeda commit 65e608e

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

packages/http/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import HttpDefault from './createHttpHandler';
22
import initialRequest from './initialRequest';
33
import lsRefs from './lsRefs';
4-
import fetchObjects from './fetchObjects';
4+
import fetchObjects, {fetchObjectsV2} from './fetchObjects';
55

66
export type {
77
default as Context,
@@ -21,4 +21,4 @@ export {blobNone, blobLimit, treeDepth} from '@rollingversions/git-protocol';
2121

2222
export {initialRequest};
2323
export {lsRefs};
24-
export {fetchObjects};
24+
export {fetchObjects, fetchObjectsV2};

scripts/test-pull.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,12 @@ async function pullRepo() {
153153
);
154154
const trees = new Map();
155155
let rootHash = ``;
156+
let commitCount = 0;
156157
await new Promise((resolve, reject) => {
157158
fetchResponse
158159
.on(`data`, (entry) => {
159160
if (gitObj.objectIsCommit(entry.body)) {
161+
commitCount++;
160162
const commit = gitObj.decodeObject(entry.body);
161163
console.warn(`${chalk.magenta(entry.hash)} ${commit.body.message}`);
162164
headTreeSha = commit.body.tree;
@@ -215,7 +217,8 @@ async function pullRepo() {
215217
}
216218

217219
const end = Date.now();
218-
console.log(chalk.green(`Pull duration: ${end - start}`));
220+
console.log(chalk.green(`Pull duration: ${end - start}ms`));
221+
console.log(chalk.green(`Commit count: ${commitCount}`));
219222
}
220223

221224
pullRepo().catch((ex) => {

0 commit comments

Comments
 (0)