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 / worktree / one-secret.ts
16 lines · 574 BRaw
1import { SECRET_DIFF } from './secret-diff.js'
2import { WORKTREE_LINES } from './worktree-lines.js'
3
4/**
5 * Git's output in the linked worktree /main/wt, whose one change is a
6 * secrets file, for each invocation whose command line holds the key.
7 *
8 * @returns the answers, fresh each call so a test may rewrite them
9 */
10export const oneSecret = (): Record<string, string> => ({
11 'rev-parse --path-format=absolute': WORKTREE_LINES,
12 'HEAD --shortstat': ' 1 file changed, 1 insertion(+)',
13 'HEAD --numstat': '1\t0\t.env\0',
14 'ls-files': '',
15 '-- .env': SECRET_DIFF,
16})