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
git rev-parse --verify <arg>^{commit}succeeds ->GitRef- Path-like arg that doesn’t exist (contains
/or.json) -> error (file not found) - Neither -> error