Exgit.Application (exgit v0.1.0)

Copy Markdown View Source

OTP application callback for Exgit.

Starts a minimal supervision tree that only exists to support opt-in process-based features:

  • Exgit.TaskSupervisorTask.Supervisor used by Exgit.FS.prefetch_async/2 to run background prefetches under supervision. The supervisor uses restart: :temporary semantics by default (Task.Supervisor never restarts a dead task), so a crashed prefetch is logged and forgotten, not infinitely retried.

Callers who use only the pure-value API (Exgit.clone/2, Exgit.FS.grep/4, etc.) pay for this supervisor but its cost is negligible: one idle Erlang process (<1 KB). If even that is unacceptable, build with otp_app: false — but then Exgit.RepoHandle, Exgit.FS.prefetch_async/2, and Exgit.RepoRegistry will not be available.

The Exgit.IndexCache ETS owner is also started here for the pre-existing idx view cache.