From 89bc3507d2020d6c8423c9880cfa0bcec0114a43 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 20 Mar 2024 22:51:52 +0200 Subject: [PATCH] add lazy warning and cache for clone [ghstack-poisoned] --- lix/source-code/client/src/openRepository.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lix/source-code/client/src/openRepository.ts b/lix/source-code/client/src/openRepository.ts index 3abcd1efde..4ee3fbef66 100644 --- a/lix/source-code/client/src/openRepository.ts +++ b/lix/source-code/client/src/openRepository.ts @@ -15,12 +15,14 @@ import { hash } from "./hash.js" // TODO: LSTAT is not properly in the memory fs! const { + TREE, clone, listRemotes, status, statusMatrix, push, pull, + walk, currentBranch, add, log, @@ -123,6 +125,7 @@ export async function openRepository( const maybeGitDir = await rawFs.lstat(".git").catch((error: any) => ({ error })) if ("error" in maybeGitDir) { doLixClone = true + console.info("Lix lazy features are enabled") } } @@ -184,6 +187,7 @@ export async function openRepository( onRes: optimizedRefsRes, }), dir, + cache, corsProxy: gitProxyUrl, url: gitUrl, singleBranch: true,