Download mods/diff/hooks/git/parse/shortstat-pattern/shortstat-pattern.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/git/parse/shortstat-pattern/shortstat-pattern.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/hooks/git/parse/shortstat-pattern/shortstat-pattern.ts
-
curl -L -o shortstat-pattern.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/git/parse/shortstat-pattern/shortstat-pattern.ts
368 Bytes
| /** | |
| * `--shortstat`'s one line, ` 3 files changed, 10 insertions(+), 2 | |
| * deletions(-)`, either tail optional; the counts captured by name. | |
| */ | |
| export const SHORTSTAT_PATTERN = new RegExp( | |
| [ | |
| String.raw`(?<files>\d+) files? changed`, | |
| String.raw`(?:, (?<added>\d+) insertions?\(\+\))?`, | |
| String.raw`(?:, (?<removed>\d+) deletions?\(-\))?`, | |
| ].join(''), | |
| ) | |