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
//! What:
//! Conflict handling around commits and checkouts:
//! side flags,
//! saved copies of conflicted files and leftover markers.
//! Why:
//! These modules answer one question,
//! what happens to a file that has conflict state.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // conflict/index.ts: one `export * from './file'` per module below.
//! ```
/// The `checkout` and `restore` command lines that take one side of a conflicted file.
/// Finding and copying the file a conflict-side command replaces.
/// The operation in progress and the conflicted paths.
/// Whether every token of a command line names a conflicted file.
/// The pathspec modes and magic of a conflict-side line.
/// The notices of a conflict-side command.
/// The saved copy of each file a conflict-side command replaces.
/// The linked-worktree policy's carve-out for conflicted files during a merge, rebase, cherry-pick or revert.
/// The append-only record of every command form that can discard uncommitted state.
/// The `discardedCopies` section of `cli-git.config.jsonc`.
/// The bound on the folder of saved copies of conflicted files: age, size, audit and doctor report.
/// The folder of saved copies opened once without following a link, with every read and removal addressed through descriptors.
/// The marker lines a committed file still holds, and the line about an operation a commit left open.
/// The stash and conflict stages Git's apply of an autostash left in the commit's scratch repository, carried back.