Documentation
¶
Overview ¶
Package gitx starts the git commands Djinn runs, each with a deadline: a git that talks to a remote (over ssh, a stalled connection or a prompt nobody sees) or waits on a lock never holds Djinn for good (W504).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Local is the longest a git command that stays in the repository may run: a merge or a checkout of a large one. Local = 10 * time.Minute // Network is the longest a git command that reaches a remote may run: fetch, push, ls-remote. Network = 5 * time.Minute // WaitDelay is how long a git killed at its deadline may keep its output open: an ssh it started may hold it. WaitDelay = 5 * time.Second )
Functions ¶
func Command ¶
func Command(ctx context.Context, dir string, args ...string) (cmd *exec.Cmd, cancel context.CancelFunc)
Command is git with args, run in dir, never prompting for credentials, killed at the earlier of ctx's deadline and its own: Network for a command that reaches a remote, Local otherwise. Call cancel once it has run: it logs it.
Types ¶
This section is empty.