Git introspection for the environment block, backed by the native git
binary (via internal.git).
Returns a snapshot map for the repository that contains start
(typically the JVM working directory). nil when start is not inside any
git repository. Never throws — every git call is guarded; on any failure we
degrade gracefully to nil or a reduced-shape map.
The expensive call is git status (working-tree walk). When it fails or is
suppressed, the snapshot drops the dirty-status fields instead of stalling
the system-prompt build.
Git introspection for the environment block, backed by the native `git` binary (via `internal.git`). Returns a snapshot map for the repository that contains `start` (typically the JVM working directory). nil when `start` is not inside any git repository. Never throws — every git call is guarded; on any failure we degrade gracefully to nil or a reduced-shape map. The expensive call is `git status` (working-tree walk). When it fails or is suppressed, the snapshot drops the dirty-status fields instead of stalling the system-prompt build.
Retained for call-site compatibility. Native git status is fast, so this
is no longer a hard walk deadline — run-git applies its own subprocess
timeout.
Retained for call-site compatibility. Native `git status` is fast, so this is no longer a hard walk deadline — `run-git` applies its own subprocess timeout.
(snapshot start-file)(snapshot start-file {:keys [status?] :or {status? true}})Inspect the repository that contains start-file. Returns a map of git
facts, or nil when start-file is not in a repo.
Options:
:status? - when true, run git status for dirty counters. Defaults true.
Inspect the repository that contains `start-file`. Returns a map of git facts, or nil when `start-file` is not in a repo. Options: :status? - when true, run `git status` for dirty counters. Defaults true.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |