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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
pub mod edit {
use crate::config;
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
FileTransactionPrepare(#[from] git_ref::file::transaction::prepare::Error),
#[error(transparent)]
FileTransactionCommit(#[from] git_ref::file::transaction::commit::Error),
#[error(transparent)]
NameValidation(#[from] git_validate::reference::name::Error),
#[error("Could not interpret core.filesRefLockTimeout or core.packedRefsTimeout, it must be the number in milliseconds to wait for locks or negative to wait forever")]
LockTimeoutConfiguration(#[from] config::lock_timeout::Error),
#[error(transparent)]
ParseCommitterTime(#[from] crate::config::time::Error),
}
}
pub mod peel {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
ToId(#[from] git_ref::peel::to_id::Error),
#[error(transparent)]
PackedRefsOpen(#[from] git_ref::packed::buffer::open::Error),
}
}
pub mod head_id {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
Head(#[from] crate::reference::find::existing::Error),
#[error(transparent)]
PeelToId(#[from] crate::head::peel::Error),
#[error("Branch '{name}' does not have any commits")]
Unborn { name: git_ref::FullName },
}
}
pub mod head_commit {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
Head(#[from] crate::reference::find::existing::Error),
#[error(transparent)]
PeelToCommit(#[from] crate::head::peel::to_commit::Error),
}
}
pub mod find {
pub mod existing {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
Find(#[from] crate::reference::find::Error),
#[error("The reference did not exist")]
NotFound,
}
}
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
Find(#[from] git_ref::file::find::Error),
#[error(transparent)]
PackedRefsOpen(#[from] git_ref::packed::buffer::open::Error),
}
}