fix(core): stop repository discovery at nearest marker (#39714)

This commit is contained in:
Kit Langton 2026-07-30 13:28:29 -04:00 committed by GitHub
commit 9d55b223bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 21 deletions

View file

@ -201,7 +201,7 @@ const layer = Layer.effect(
locks.withLock(repository.gitDirectory)(effect)
const discover = Effect.fn("Git.repo.discover")(function* (input: AbsolutePath) {
const dotgit = yield* fs.up({ targets: [".git"], start: input }).pipe(
const dotgit = yield* fs.up({ targets: [".git"], start: input, mode: "first" }).pipe(
Effect.map((matches) => matches[0]),
Effect.catch(() => Effect.succeed(undefined)),
)