pub fn classify_diff_arg(arg: &str, repo_root: &Path) -> Result<DiffArg, Error>Expand description
Classify a diff argument as a snapshot file or git ref.
Detection order:
- Existing file on disk -> Snapshot
- Path-like arg that doesn’t exist (contains
/or.json) -> error (file not found) git rev-parse --verify <arg>succeeds ->GitRef- Neither -> error