1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! One shape for every git invocation, aimed at one repository.
//!
//! `current_dir` decides where git RUNS. It does not decide which repository
//! git ACTS ON: an inherited `GIT_DIR` overrides directory discovery
//! entirely, and git exports an absolute one to every hook when the checkout
//! is a worktree. So a `sherd` verb invoked from a hook -- or a test running
//! under one -- reached past the root it was handed and operated on whatever
//! repository the hook belonged to (`.:B25`).
//!
//! Nine call sites across `plan`, `review` and `land` each wrote the same
//! three lines, so nine of them were wrong in the same way. This module is
//! the one reading, which is the shape §C asks for.
use Path;
use Command;
/// The git variables a hook exports to everything it spawns.
///
/// `GIT_DIR` alone does the damage. The rest steer the same discovery, and
/// no caller here has a reason to honour any of them.
pub const INHERITED: = ;
/// Strip the inherited environment from a command already built.
/// A git command aimed at `root` and at no other repository.
/// A git command whose own arguments name the repository (`--git-dir`, or a
/// path operand), so it takes no working directory of its own.