Skip to content

Commit aa47342

Browse files
committed
Revert "adapt to changes in gix-attributes" (#1050)
This reverts commit 0fac1b9.
1 parent 355fd19 commit aa47342

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

gitoxide-core/src/repository/index/entries.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,7 @@ pub(crate) mod function {
294294
Ok((pathspec.into_parts().0, index, cache))
295295
}
296296

297-
#[cfg(feature = "serde")]
298-
#[derive(serde::Serialize)]
299-
struct AttrsForSerde {
300-
is_excluded: bool,
301-
attributes: Vec<String>,
302-
}
303-
297+
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
304298
struct Attrs {
305299
is_excluded: bool,
306300
attributes: Vec<gix::attrs::Assignment>,
@@ -337,7 +331,7 @@ pub(crate) mod function {
337331
flags: u32,
338332
mode: u32,
339333
path: std::borrow::Cow<'a, str>,
340-
meta: Option<AttrsForSerde>,
334+
meta: Option<Attrs>,
341335
}
342336

343337
serde_json::to_writer(
@@ -354,14 +348,7 @@ pub(crate) mod function {
354348
path.extend_from_slice(entry.path(index));
355349
path.to_string().into()
356350
},
357-
meta: attrs.map(|attrs| AttrsForSerde {
358-
is_excluded: attrs.is_excluded,
359-
attributes: attrs
360-
.attributes
361-
.into_iter()
362-
.map(|attr| attr.as_ref().to_string())
363-
.collect(),
364-
}),
351+
meta: attrs,
365352
},
366353
)?;
367354

0 commit comments

Comments
 (0)