Skip to content

Commit

Permalink
fix: add missing export to http package (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay authored Mar 6, 2022
1 parent e7afeda commit 65e608e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/http/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HttpDefault from './createHttpHandler';
import initialRequest from './initialRequest';
import lsRefs from './lsRefs';
import fetchObjects from './fetchObjects';
import fetchObjects, {fetchObjectsV2} from './fetchObjects';

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

export {initialRequest};
export {lsRefs};
export {fetchObjects};
export {fetchObjects, fetchObjectsV2};
5 changes: 4 additions & 1 deletion scripts/test-pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ async function pullRepo() {
);
const trees = new Map();
let rootHash = ``;
let commitCount = 0;
await new Promise((resolve, reject) => {
fetchResponse
.on(`data`, (entry) => {
if (gitObj.objectIsCommit(entry.body)) {
commitCount++;
const commit = gitObj.decodeObject(entry.body);
console.warn(`${chalk.magenta(entry.hash)} ${commit.body.message}`);
headTreeSha = commit.body.tree;
Expand Down Expand Up @@ -215,7 +217,8 @@ async function pullRepo() {
}

const end = Date.now();
console.log(chalk.green(`Pull duration: ${end - start}`));
console.log(chalk.green(`Pull duration: ${end - start}ms`));
console.log(chalk.green(`Commit count: ${commitCount}`));
}

pullRepo().catch((ex) => {
Expand Down

0 comments on commit 65e608e

Please sign in to comment.