Skip to content

Commit 88e709d

Browse files
committed
feat: add Status iterator.
TBD
1 parent 51c7abc commit 88e709d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

gix/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ pub use gix_ref as refs;
129129
pub use gix_refspec as refspec;
130130
pub use gix_revwalk as revwalk;
131131
pub use gix_sec as sec;
132-
#[cfg(feature = "status")]
133-
pub use gix_status as status;
134132
pub use gix_tempfile as tempfile;
135133
pub use gix_trace as trace;
136134
pub use gix_traverse as traverse;
@@ -308,6 +306,10 @@ pub mod init;
308306
/// Not to be confused with 'status'.
309307
pub mod state;
310308

309+
///
310+
#[cfg(feature = "status")]
311+
pub mod status;
312+
311313
///
312314
pub mod shallow;
313315

gix/src/status.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use crate::Repository;
2+
pub use gix_status as plumbing;
3+
4+
/// A structure to hold options configuring the status request, which can then be turned into an iterator.
5+
#[derive(Clone)]
6+
pub struct Platform<'repo> {
7+
repo: &'repo Repository,
8+
}
9+
10+
/// Status
11+
impl Repository {
12+
/// Obtain a platform for configuring and traversing the git repository status.
13+
pub fn status(&self) -> Platform<'_> {
14+
Platform { repo: self }
15+
}
16+
}

0 commit comments

Comments
 (0)