@@ -65,19 +65,21 @@ impl<'repo> Reference<'repo> {
65
65
66
66
/// Peeling
67
67
impl < ' repo > Reference < ' repo > {
68
- /// Follow all symbolic targets this reference might point to and peel the underlying object
69
- /// to the end of the chain , and return it.
68
+ /// Follow all symbolic targets this reference might point to and peel all annotated tags
69
+ /// to their first non-tag target , and return it,
70
70
///
71
- /// This is useful to learn where this reference is ultimately pointing to.
71
+ /// This is useful to learn where this reference is ultimately pointing to after following
72
+ /// the chain of symbolic refs and annotated tags.
72
73
pub fn peel_to_id_in_place ( & mut self ) -> Result < Id < ' repo > , peel:: Error > {
73
74
let oid = self . inner . peel_to_id_in_place ( & self . repo . refs , & self . repo . objects ) ?;
74
75
Ok ( Id :: from_id ( oid, self . repo ) )
75
76
}
76
77
77
- /// Follow all symbolic targets this reference might point to and peel the underlying object
78
- /// to the end of the chain , and return it, reusing the `packed` buffer if available.
78
+ /// Follow all symbolic targets this reference might point to and peel all annotated tags
79
+ /// to their first non-tag target , and return it, reusing the `packed` buffer if available.
79
80
///
80
- /// This is useful to learn where this reference is ultimately pointing to.
81
+ /// This is useful to learn where this reference is ultimately pointing to after following
82
+ /// the chain of symbolic refs and annotated tags.
81
83
pub fn peel_to_id_in_place_packed (
82
84
& mut self ,
83
85
packed : Option < & gix_ref:: packed:: Buffer > ,
@@ -88,7 +90,7 @@ impl<'repo> Reference<'repo> {
88
90
Ok ( Id :: from_id ( oid, self . repo ) )
89
91
}
90
92
91
- /// Similar to [`peel_to_id_in_place()`][ Reference::peel_to_id_in_place()] , but consumes this instance.
93
+ /// Similar to [`peel_to_id_in_place()`]( Reference::peel_to_id_in_place()) , but consumes this instance.
92
94
pub fn into_fully_peeled_id ( mut self ) -> Result < Id < ' repo > , peel:: Error > {
93
95
self . peel_to_id_in_place ( )
94
96
}
0 commit comments