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 / probes / is-safe-ref-name / safe-ref-pattern / safe-ref-pattern.ts
5 lines · 211 BRaw
1/**
2 * The refnames the HEAD poll will touch on disk: under `refs/`, of plain
3 * name characters only, `/` between components.
4 */
5export const SAFE_REF_PATTERN = /^refs(?:\/[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*)+$/