Run.located: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/tool/run.bend as Run Lines 97-107 of ezx@1.11.0.0/src/tool/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/tool/run.bend&start_line=97&end_line=107 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/tool/world.bend as TW # what git says of a path that has a real path: the top of its checkout, # HEAD, and what `git status` names, untracked files included whatever the # repository's own settings hide def located(+abs: String) -> IO(TW.Answer): do IO: +top : String <- R.exec(["git", "-C", abs, "rev-parse", "--show-toplevel"]) +head : String <- R.exec(["git", "-C", abs, "rev-parse", "HEAD"]) +st : String <- R.exec(["git", "-C", abs, "status", "--porcelain", "--untracked-files=normal"]) return TW.Located{abs, said.top(top), said.head(head), R.ok(st), String.trim(R.text(st))} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/run.bend&name=said.head https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/run.bend&name=said.top https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=ok https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=text