def is_rev

ezx@1.11.0.0 · src/git/git.bend:92

import ezx@1.11.0.0/src/git/git.bend as Git
import Base

92# a ref that is already the commit it names, which is what `git rev-parse`
93# prints: forty hex characters and nothing else. Such a ref needs no remote
94# asked about it, and leaves no tag behind to re-resolve later.
95def is_rev(+ref: String) -> Bool:
96  Bool.and(Nat.is_eq(String.length(ref), 40n), hex.all(String.to_list(ref)))

Uses (7)

Used by (8)