Skip to content

Commit

Permalink
add lazy warning and cache for clone
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
janfjohannes committed Mar 20, 2024
1 parent d1aee1e commit 89bc350
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lix/source-code/client/src/openRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
}
}

Expand Down Expand Up @@ -184,6 +187,7 @@ export async function openRepository(
onRes: optimizedRefsRes,
}),
dir,
cache,
corsProxy: gitProxyUrl,
url: gitUrl,
singleBranch: true,
Expand Down

0 comments on commit 89bc350

Please sign in to comment.