Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2319bab commit 2a140a1Copy full SHA for 2a140a1
src/repository.rs
@@ -14,6 +14,7 @@ pub struct Repository {
14
pub branches: Vec<Branch>,
15
pub references: Vec<Reference>,
16
pub pack_indexes: Vec<PackIndex>,
17
+ pub bare: bool,
18
}
19
20
impl Repository {
@@ -32,6 +33,24 @@ impl Repository {
32
33
branches: Vec::new(),
34
references: Vec::new(),
35
pack_indexes: Vec::new(),
36
+ bare: false,
37
+ }
38
39
+
40
+ pub fn open_bare(path: &str) -> Repository {
41
+ let repository_path = Path::new(path);
42
+ let wc_path = repository_path.clone();
43
44
+ init(&repository_path);
45
46
+ Repository {
47
+ path: repository_path,
48
+ wc_path: wc_path,
49
+ tags: Vec::new(),
50
+ branches: Vec::new(),
51
+ references: Vec::new(),
52
+ pack_indexes: Vec::new(),
53
+ bare: true,
54
55
56
0 commit comments