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 / hooks / git / parse / is-body-line / is-body-line.ts
9 lines · 368 BRaw
1/**
2 * Whether a line after a hunk header is a body line (added, removed or
3 * context) rather than a note such as `\ No newline at end of file`.
4 *
5 * @param line one line of `git diff` output
6 * @returns whether it starts with `+`, `-` or a space
7 */
8export const isBodyLine = (line: string) =>
9 line.startsWith('+') || line.startsWith('-') || line.startsWith(' ')