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
90
91
92
93
use std::path::PathBuf;
use git_features::threading::{MutableOnDemand, OwnShared};
#[derive(Debug, Clone)]
pub struct Store {
base: PathBuf,
object_hash: git_hash::Kind,
pub write_reflog: WriteReflog,
pub namespace: Option<Namespace>,
packed: OwnShared<MutableOnDemand<packed::modifiable::State>>,
}
mod access {
use std::path::Path;
use crate::file;
impl file::Store {
pub fn base(&self) -> &Path {
&self.base
}
}
}
pub struct Transaction<'s> {
store: &'s Store,
packed_transaction: Option<crate::store_impl::packed::Transaction>,
updates: Option<Vec<transaction::Edit>>,
packed_refs: transaction::PackedRefs,
}
pub(in crate::store_impl::file) fn path_to_name(path: impl Into<PathBuf>) -> git_object::bstr::BString {
use os_str_bytes::OsStringBytes;
let path = path.into().into_raw_vec();
#[cfg(windows)]
let path = {
use git_object::bstr::ByteSlice;
path.replace(b"\\", b"/")
};
path.into()
}
pub mod loose;
mod overlay_iter;
pub mod iter {
pub use super::{
loose::iter::{loose, Loose},
overlay_iter::{LooseThenPacked, Platform},
};
pub mod loose_then_packed {
pub use super::super::overlay_iter::Error;
}
}
pub mod log;
pub mod find;
pub mod transaction;
pub mod packed;
mod raw_ext;
pub use raw_ext::ReferenceExt;
use crate::{store::WriteReflog, Namespace};