Skip to content

Commit

Permalink
feat: add Status iterator.
Browse files Browse the repository at this point in the history
TBD
  • Loading branch information
Byron committed Nov 11, 2023
1 parent a28bf90 commit 3474841
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ pub use gix_ref as refs;
pub use gix_refspec as refspec;
pub use gix_revwalk as revwalk;
pub use gix_sec as sec;
#[cfg(feature = "status")]
pub use gix_status as status;
pub use gix_tempfile as tempfile;
pub use gix_trace as trace;
pub use gix_traverse as traverse;
Expand Down Expand Up @@ -308,6 +306,10 @@ pub mod init;
/// Not to be confused with 'status'.
pub mod state;

///
#[cfg(feature = "status")]
pub mod status;

///
pub mod shallow;

Expand Down
16 changes: 16 additions & 0 deletions gix/src/status.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use crate::Repository;
pub use gix_status as plumbing;

/// A structure to hold options configuring the status request, which can then be turned into an iterator.
#[derive(Clone)]
pub struct Platform<'repo> {
repo: &'repo Repository,
}

/// Status
impl Repository {
/// Obtain a platform for configuring and traversing the git repository status.
pub fn status(&self) -> Platform<'_> {
Platform { repo: self }
}
}

0 comments on commit 3474841

Please sign in to comment.