Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/web/src/git-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ async function cloneAndFetchMain(args: {
const dir = "/repo";
await fs.promises.mkdir(dir);
await git.init({ fs, dir, defaultBranch: "main" });
// isomorphic-git needs a configured remote to derive its refspec; a bare
// `url` on a fresh repo fails with "Could not find a fetch refspec".
await git.addRemote({ fs, dir, remote: "origin", url: args.url });
await git.fetch({
fs,
http,
dir,
url: args.url,
remote: "origin",
ref: MAIN_REF,
// The hub's git server advertises no `shallow` capability, so a
// depth-limited fetch is rejected outright; fetch the full branch.
Expand Down
Loading