Skip to content

Commit 16366f0

Browse files
committed
feat: add Status iterator.
TBD
1 parent 22acf0d commit 16366f0

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
@@ -131,8 +131,6 @@ pub use gix_ref as refs;
131131
pub use gix_refspec as refspec;
132132
pub use gix_revwalk as revwalk;
133133
pub use gix_sec as sec;
134-
#[cfg(feature = "status")]
135-
pub use gix_status as status;
136134
pub use gix_tempfile as tempfile;
137135
pub use gix_trace as trace;
138136
pub use gix_traverse as traverse;
@@ -312,6 +310,10 @@ pub mod init;
312310
/// Not to be confused with 'status'.
313311
pub mod state;
314312

313+
///
314+
#[cfg(feature = "status")]
315+
pub mod status;
316+
315317
///
316318
pub mod shallow;
317319

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)