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 / argv / diff-leading-args.ts
23 lines · 759 BRaw
1/**
2 * The leading argv of every `git diff` the plugin runs: the config the
3 * engine's own diff panel pins, `core.quotePath=false`, and raw-blob flags.
4 *
5 * Root-relative paths whatever `diff.relative` says, non-ASCII paths as
6 * their own bytes, no optional locks, no child `git status` in a dirty
7 * submodule, no external diff or textconv driver even on a stats pass, and
8 * no color escapes whatever `color.ui` or `color.diff` says, so a hunk
9 * header parses where either is set to `always`.
10 */
11export const DIFF_LEADING_ARGS = [
12 '--no-optional-locks',
13 '-c',
14 'diff.relative=false',
15 '-c',
16 'core.quotePath=false',
17 'diff',
18 '--no-color',
19 '--no-ext-diff',
20 '--no-textconv',
21 '--ignore-submodules=dirty',
22 '--submodule=short',
23] as const