spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / scripted / probed-repository-of.ts
12 lines · 411 BRaw
1import Git from '../../../hooks/git'
2import { ok } from './ok.js'
3import { scriptedGitOf } from './scripted-git-of.js'
4
5/**
6 * What the repository probe makes of a scripted `rev-parse` answer.
7 *
8 * @param stdout the scripted rev-parse output
9 * @returns the probed repository, or null
10 */
11export const probedRepositoryOf = (stdout: string) =>
12 Git.repositoryOf(scriptedGitOf({ 'rev-parse': ok(stdout) }).run)