Documentation
¶
Overview ¶
Package gitinfo is the one place aimux asks git about a folder: its top-level and common dir, its origin and its branch. folders and gitremote both read through it, so a folder costs one `rev-parse` however many of them ask.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Branch ¶
Branch returns dir's current branch ("HEAD" when detached). A repository with no commit yet has no HEAD to resolve, so it falls back to the name the first commit will get.
func Top ¶
Top returns the top-level and the common git dir of dir, both absolute. A success is remembered for a minute, so callers that ask about the same folder share one git call; failures are not remembered. gitremote caches its own result for a minute on top of this, so the root it reports can be up to ~120 s stale.
Types ¶
This section is empty.