Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub struct IndexEntries<'a> {
index: &'a Index,
}

/// A callback function to filter index matches.
///
/// Used by `Index::{add_all,remove_all,update_all}`. The first argument is the
/// path, and the second is the patchspec that matched it. Return 0 to confirm
/// the operation on the item, > 0 to skip the item, and < 0 to abort the scan.
pub type IndexMatchedPath<'a> = |&[u8], &[u8]|: 'a -> int;

/// A structure to represent an entry or a file inside of an index.
Expand Down