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