Git.is_rev: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/git/git.bend as Git Lines 92-96 of ezx@1.11.0.0/src/git/git.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/git/git.bend&start_line=92&end_line=96 import Base # a ref that is already the commit it names, which is what `git rev-parse` # prints: forty hex characters and nothing else. Such a ref needs no remote # asked about it, and leaves no tag behind to re-resolve later. def is_rev(+ref: String) -> Bool: Bool.and(Nat.is_eq(String.length(ref), 40n), hex.all(String.to_list(ref))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.to_list https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/git/git.bend&name=hex.all