@@ -19,15 +19,17 @@ pub struct Worktree<'repo> {
1919pub struct Head < ' repo > {
2020 /// One of various possible states for the HEAD reference
2121 pub kind : head:: Kind ,
22- pub ( crate ) repo : & ' repo Repository ,
22+ /// The owning repository.
23+ pub repo : & ' repo Repository ,
2324}
2425
2526/// An [`ObjectId`] with access to a repository.
2627#[ derive( Clone , Copy ) ]
2728pub struct Id < ' r > {
2829 /// The actual object id
2930 pub ( crate ) inner : ObjectId ,
30- pub ( crate ) repo : & ' r Repository ,
31+ /// The owning repository.
32+ pub repo : & ' r Repository ,
3133}
3234
3335/// A decoded object with a reference to its owning repository.
@@ -39,7 +41,8 @@ pub struct Object<'repo> {
3941 pub kind : gix_object:: Kind ,
4042 /// The fully decoded object data
4143 pub data : Vec < u8 > ,
42- pub ( crate ) repo : & ' repo Repository ,
44+ /// The owning repository.
45+ pub repo : & ' repo Repository ,
4346}
4447
4548impl Drop for Object < ' _ > {
@@ -55,7 +58,8 @@ pub struct Blob<'repo> {
5558 pub id : ObjectId ,
5659 /// The blob's data.
5760 pub data : Vec < u8 > ,
58- pub ( crate ) repo : & ' repo Repository ,
61+ /// The owning repository.
62+ pub repo : & ' repo Repository ,
5963}
6064
6165impl Drop for Blob < ' _ > {
@@ -71,7 +75,8 @@ pub struct Tree<'repo> {
7175 pub id : ObjectId ,
7276 /// The fully decoded tree data
7377 pub data : Vec < u8 > ,
74- pub ( crate ) repo : & ' repo Repository ,
78+ /// The owning repository.
79+ pub repo : & ' repo Repository ,
7580}
7681
7782impl Drop for Tree < ' _ > {
@@ -87,7 +92,8 @@ pub struct Tag<'repo> {
8792 pub id : ObjectId ,
8893 /// The fully decoded tag data
8994 pub data : Vec < u8 > ,
90- pub ( crate ) repo : & ' repo Repository ,
95+ /// The owning repository.
96+ pub repo : & ' repo Repository ,
9197}
9298
9399impl Drop for Tag < ' _ > {
@@ -103,7 +109,8 @@ pub struct Commit<'repo> {
103109 pub id : ObjectId ,
104110 /// The fully decoded commit data
105111 pub data : Vec < u8 > ,
106- pub ( crate ) repo : & ' repo Repository ,
112+ /// The owning repository.
113+ pub repo : & ' repo Repository ,
107114}
108115
109116impl Drop for Commit < ' _ > {
@@ -132,7 +139,8 @@ pub struct ObjectDetached {
132139pub struct Reference < ' r > {
133140 /// The actual reference data
134141 pub inner : gix_ref:: Reference ,
135- pub ( crate ) repo : & ' r Repository ,
142+ /// The owning repository.
143+ pub repo : & ' r Repository ,
136144}
137145
138146/// A thread-local handle to interact with a repository from a single thread.
@@ -219,7 +227,8 @@ pub struct Remote<'repo> {
219227 // pub(crate) prune: bool,
220228 // /// Delete tags that don't exist on the remote anymore, equivalent to pruning the refspec `refs/tags/*:refs/tags/*`.
221229 // pub(crate) prune_tags: bool,
222- pub ( crate ) repo : & ' repo Repository ,
230+ /// The owning repository.
231+ pub repo : & ' repo Repository ,
223232}
224233
225234/// A utility to make matching against pathspecs simple.
@@ -231,7 +240,8 @@ pub struct Remote<'repo> {
231240#[ derive( Clone ) ]
232241#[ cfg( feature = "attributes" ) ]
233242pub struct Pathspec < ' repo > {
234- pub ( crate ) repo : & ' repo Repository ,
243+ /// The owning repository.
244+ pub repo : & ' repo Repository ,
235245 /// The cache to power attribute access. It's only initialized if we have a pattern with attributes.
236246 pub ( crate ) stack : Option < gix_worktree:: Stack > ,
237247 /// The prepared search to use for checking matches.
@@ -261,6 +271,7 @@ pub struct Submodule<'repo> {
261271/// A utility to access `.gitattributes` and `.gitignore` information efficiently.
262272#[ cfg( any( feature = "attributes" , feature = "excludes" ) ) ]
263273pub struct AttributeStack < ' repo > {
264- pub ( crate ) repo : & ' repo Repository ,
274+ /// The owning repository.
275+ pub repo : & ' repo Repository ,
265276 pub ( crate ) inner : gix_worktree:: Stack ,
266277}
0 commit comments