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 / hunks-read-of.ts
13 lines · 444 BRaw
1import { hunksAnswerOf } from './hunks-answer-of.js'
2import { ok } from './ok.js'
3import { oneAddedOf } from './one-added-of.js'
4
5/**
6 * A hunks read git answered for the given paths, in their order: in each
7 * file one added line that names it.
8 *
9 * @param paths the changed files
10 * @returns the run result
11 */
12export const hunksReadOf = (paths: readonly string[]) =>
13 ok(hunksAnswerOf(paths.map(path => [path, oneAddedOf(`in ${path}`)])))