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
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 2youg1 and the sprawling contributors
//! The two steps of the unified history that write a tree: going back to
//! a point, and taking one file back from a point.
//!
//! `crates/storage/spec/Worktree/Back.lean` requires that each step appends
//! exactly one record and that an undo is one of them, never a removal;
//! these are those records. The tree is named by its worktree name, as
//! in `worktree_opened`, and never by its path on disk, because a
//! history that carries a path is a fact about one machine.
use ;
use crateGitOid;
/// `went_back`: the tree `name` was opened with its branch at `point`.
/// `file_restored`: `path` in the tree `name` now holds what `point`
/// holds there, or nothing when `point` holds no such file. An empty
/// `name` is the city's own working tree, which a person takes a file
/// back into from a page (`crates/wire/Spec.lean` ยง8-62).