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 / git-words / git-words.ts
19 lines · 575 BRaw
1import type Backend from '../../backend'
2
3/**
4 * The pane's git words, unquoted as DiffDetailView words them.
5 *
6 * Compared with HEAD, read by `git diff`, untracked files listed by git and
7 * staged with `git add :/…`.
8 */
9export const GIT_WORDS: Backend.BackendWords = Object.freeze({
10 base: 'HEAD',
11 diffCommand: 'git diff',
12 lister: 'git',
13 untrackedNoteOf: (path: string, isPasteable: boolean) => [
14 'New file not yet staged.',
15 isPasteable
16 ? `Run \`git add :/${path}\` to see line counts.`
17 : 'Stage it with git add to see line counts.',
18 ],
19})