@@ -121,12 +121,12 @@ pub(crate) struct Store {
121
121
inner : store:: State ,
122
122
}
123
123
124
- /// A validated complete and fully qualified referenced reference name, safe to use for all operations.
124
+ /// A validated complete and fully qualified reference name, safe to use for all operations.
125
125
#[ derive( PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
126
126
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
127
127
pub struct FullName ( pub ( crate ) BString ) ;
128
128
129
- /// A validated complete and fully qualified referenced reference name, safe to use for all operations.
129
+ /// A validated complete and fully qualified reference name, safe to use for all operations.
130
130
#[ derive( Hash , Debug , PartialEq , Eq , Ord , PartialOrd ) ]
131
131
#[ repr( transparent) ]
132
132
pub struct FullNameRef ( BStr ) ;
@@ -138,10 +138,12 @@ pub struct PartialNameRef(BStr);
138
138
139
139
/// A validated and potentially partial reference name, safe to use for common operations.
140
140
#[ derive( PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
141
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
141
142
pub struct PartialName ( BString ) ;
142
143
143
144
/// A _validated_ prefix for references to act as a namespace.
144
145
#[ derive( PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
146
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
145
147
pub struct Namespace ( BString ) ;
146
148
147
149
/// Denotes the kind of reference.
@@ -160,6 +162,7 @@ pub enum Kind {
160
162
///
161
163
/// This translates into a prefix containing all references of a given category.
162
164
#[ derive( PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone , Copy ) ]
165
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
163
166
pub enum Category < ' a > {
164
167
/// A tag in `refs/tags`
165
168
Tag ,
@@ -179,6 +182,7 @@ pub enum Category<'a> {
179
182
/// A `PseudoRef` in another _linked_ worktree, never in the main one, like `worktrees/<id>/HEAD`.
180
183
LinkedPseudoRef {
181
184
/// The name of the worktree.
185
+ #[ cfg_attr( feature = "serde" , serde( borrow) ) ]
182
186
name : & ' a BStr ,
183
187
} ,
184
188
/// Any reference that is prefixed with `worktrees/<id>/refs/`.
0 commit comments