git-remote-entire: only suggest clone for a complete forge/owner/repo ref

main

Commit

Soph2mo ago

PR review (Cursor Bugbot + Copilot) flagged that missingClusterHostMessage unconditionally pointed at entire repo clone whenever a forge id sat in the host slot, even without owner/repo. So entire://gh suggested entire repo clone /gh and entire://gh/owner suggested /gh/owner — refs that parseMirrorCloneRef (^/?gh/<owner>/<repo>$) rejects immediately. The empty-host branch already fell back correctly, so the two equivalent mistakes were handled inconsistently.

Reconstruct the intended shorthand once (forge id in host slot vs. empty host) and only emit the hint when it is a complete forge/owner/repo triple; anything shorter or longer falls back to the plain missing-host error. Collapsing the two branches also lets clusterHostHint be inlined.

Add regression cases for entire://gh, entire://gh/owner, entire:///gh/owner, and a too-many-segments path.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 01KWYNH3035PPHFTMD9J6GWEYW

Checkpoints

git-remote-entire: Missing Cluster Host Dialog

Claude Code
View session
Checkpoint 1