bit_grep

    Grep engine over the working tree

    git
    grep
    Download zip
    Author
    Version
    0.49.1
    License
    Apache-2.0
    Last updated
    3 days ago
    Downloads
    505

    GrepExpr

    pub(all) enum GrepExpr {
    Pattern(String)
    And(GrepExpr, GrepExpr)
    Or(GrepExpr, GrepExpr)
    Not(GrepExpr)
    } derive(Eq,
    Debug
    )

    impl Show for GrepExpr

    GrepExpr::equal

    fn GrepExpr::equal(GrepExpr, GrepExpr) -> Bool

    GrepExpr::not_equal

    fn GrepExpr::not_equal(x : GrepExpr, y : GrepExpr) -> Bool

    GrepExpr::output

    fn GrepExpr::output(self : GrepExpr, logger : &Logger) -> Unit

    GrepExpr::to_repr

    GrepExpr::to_string

    fn GrepExpr::to_string(self : GrepExpr) -> String

    GrepExprMatch

    pub(all) struct GrepExprMatch {
    matched : Bool
    span : GrepMatchSpan?
    } derive(Eq,
    Debug
    )

    GrepExprMatch::equal

    GrepExprMatch::not_equal

    fn GrepExprMatch::not_equal(x : GrepExprMatch, y : GrepExprMatch) -> Bool

    GrepExprMatch::output

    fn GrepExprMatch::output(self : GrepExprMatch, logger : &Logger) -> Unit

    GrepExprMatch::to_string

    fn GrepExprMatch::to_string(self : GrepExprMatch) -> String

    GrepExprToken

    pub(all) enum GrepExprToken {
    Pattern(String)
    And
    Or
    Not
    LParen
    RParen
    } derive(Eq,
    Debug
    )

    GrepExprToken::equal

    GrepExprToken::not_equal

    fn GrepExprToken::not_equal(x : GrepExprToken, y : GrepExprToken) -> Bool

    GrepExprToken::output

    fn GrepExprToken::output(self : GrepExprToken, logger : &Logger) -> Unit

    GrepExprToken::to_string

    fn GrepExprToken::to_string(self : GrepExprToken) -> String

    GrepFileMatch

    pub(all) struct GrepFileMatch {
    path : String
    matches : Array[GrepLineMatch]
    } derive(Eq,
    Debug
    )

    GrepFileMatch::equal

    GrepFileMatch::not_equal

    fn GrepFileMatch::not_equal(x : GrepFileMatch, y : GrepFileMatch) -> Bool

    GrepFileMatch::output

    fn GrepFileMatch::output(self : GrepFileMatch, logger : &Logger) -> Unit

    GrepFileMatch::to_string

    fn GrepFileMatch::to_string(self : GrepFileMatch) -> String

    GrepLineMatch

    pub(all) struct GrepLineMatch {
    line_number : Int
    column : Int
    line : String
    } derive(Eq,
    Debug
    )

    GrepLineMatch::equal

    GrepLineMatch::not_equal

    fn GrepLineMatch::not_equal(x : GrepLineMatch, y : GrepLineMatch) -> Bool

    GrepLineMatch::output

    fn GrepLineMatch::output(self : GrepLineMatch, logger : &Logger) -> Unit

    GrepLineMatch::to_string

    fn GrepLineMatch::to_string(self : GrepLineMatch) -> String

    GrepMatchSpan

    pub(all) struct GrepMatchSpan {
    start_column : Int
    end_column : Int
    } derive(Eq,
    Debug
    )

    GrepMatchSpan::equal

    GrepMatchSpan::not_equal

    fn GrepMatchSpan::not_equal(x : GrepMatchSpan, y : GrepMatchSpan) -> Bool

    GrepMatchSpan::output

    fn GrepMatchSpan::output(self : GrepMatchSpan, logger : &Logger) -> Unit

    GrepMatchSpan::to_string

    fn GrepMatchSpan::to_string(self : GrepMatchSpan) -> String

    GrepPatternType

    pub(all) enum GrepPatternType {
    Fixed
    Basic
    Extended
    Perl
    } derive(Eq,
    Debug
    )

    GrepPatternType::equal

    GrepPatternType::not_equal

    fn GrepPatternType::not_equal(x : GrepPatternType, y : GrepPatternType) -> Bool

    GrepPatternType::output

    fn GrepPatternType::output(self : GrepPatternType, logger : &Logger) -> Unit

    GrepPatternType::to_string

    fn GrepPatternType::to_string(self : GrepPatternType) -> String

    extract_commit_message_from_raw

    fn extract_commit_message_from_raw(data : Bytes) -> String

    grep_collect_expr_match_spans

    fn grep_collect_expr_match_spans(message : String, expr : GrepExpr, pattern_type : GrepPatternType, ignore_case : Bool, word_regexp? : Bool) -> Array[GrepMatchSpan]

    grep_eval_expr

    fn grep_eval_expr(message : String, expr : GrepExpr, pattern_type : GrepPatternType, ignore_case : Bool, word_regexp? : Bool) -> GrepExprMatch

    grep_first_match_span

    fn grep_first_match_span(message : String, pattern : String, pattern_type : GrepPatternType, ignore_case : Bool, word_regexp? : Bool) -> GrepMatchSpan?

    grep_message_matches_pattern

    fn grep_message_matches_pattern(message : String, pattern : String, pattern_type : GrepPatternType, ignore_case : Bool) -> Bool

    grep_or_expr_from_patterns

    fn grep_or_expr_from_patterns(patterns : Array[String]) -> GrepExpr?

    grep_patterns_first_match_span

    fn grep_patterns_first_match_span(message : String, patterns : Array[String], pattern_type : GrepPatternType, ignore_case : Bool, word_regexp? : Bool) -> GrepMatchSpan?

    grep_patterns_match_message

    fn grep_patterns_match_message(message : String, patterns : Array[String], pattern_type : GrepPatternType, ignore_case : Bool) -> Bool

    list_index_candidate_paths

    fn list_index_candidate_paths(fs : &
    RepoFileSystem
    , git_dir : String, paths : Array[String], max_depth? : Int) -> Array[String] raise
    GitError

    list_plain_worktree_candidate_paths

    fn list_plain_worktree_candidate_paths(fs : &
    RepoFileSystem
    , root : String, paths : Array[String], max_depth? : Int, exclude_standard? : Bool) -> Array[String] raise
    GitError

    list_tracked_worktree_candidate_paths

    fn list_tracked_worktree_candidate_paths(fs : &
    RepoFileSystem
    , git_dir : String, paths : Array[String], max_depth? : Int) -> Array[String] raise
    GitError

    list_treeish_candidate_paths

    fn list_treeish_candidate_paths(fs : &
    RepoFileSystem
    , git_dir : String, spec : String, paths : Array[String], max_depth? : Int) -> Array[String] raise
    GitError

    list_untracked_worktree_candidate_paths

    fn list_untracked_worktree_candidate_paths(fs : &
    RepoFileSystem
    , git_dir : String, root : String, paths : Array[String], max_depth? : Int) -> Array[String] raise
    GitError

    parse_grep_expr

    fn parse_grep_expr(tokens : Array[GrepExprToken]) -> GrepExpr raise
    GitError

    parse_grep_pattern_type_name

    fn parse_grep_pattern_type_name(value : String) -> GrepPatternType

    resolve_grep_pattern_type

    fn resolve_grep_pattern_type(rfs : &
    RepoFileSystem
    , git_dir : String, cli_override : GrepPatternType?, config_override : String?) -> GrepPatternType

    search_index

    fn search_index(fs : &
    RepoFileSystem
    , git_dir : String, patterns : Array[String], paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_index_expr

    fn search_index_expr(fs : &
    RepoFileSystem
    , git_dir : String, expr : GrepExpr, paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_plain_worktree_expr

    fn search_plain_worktree_expr(fs : &
    RepoFileSystem
    , root : String, expr : GrepExpr, paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int, exclude_standard? : Bool) -> Array[GrepFileMatch] raise
    GitError

    search_tracked_worktree

    fn search_tracked_worktree(fs : &
    RepoFileSystem
    , git_dir : String, root : String, patterns : Array[String], paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_tracked_worktree_expr

    fn search_tracked_worktree_expr(fs : &
    RepoFileSystem
    , git_dir : String, root : String, expr : GrepExpr, paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_treeish

    fn search_treeish(fs : &
    RepoFileSystem
    , git_dir : String, spec : String, patterns : Array[String], paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_treeish_expr

    fn search_treeish_expr(fs : &
    RepoFileSystem
    , git_dir : String, spec : String, expr : GrepExpr, paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    search_untracked_worktree_expr

    fn search_untracked_worktree_expr(fs : &
    RepoFileSystem
    , git_dir : String, root : String, expr : GrepExpr, paths : Array[String], pattern_type? : GrepPatternType, ignore_case? : Bool, invert_match? : Bool, word_regexp? : Bool, max_depth? : Int) -> Array[GrepFileMatch] raise
    GitError

    validate_grep_expr

    fn validate_grep_expr(expr : GrepExpr, pattern_type : GrepPatternType) -> Unit raise
    GitError

    validate_grep_patterns

    fn validate_grep_patterns(patterns : Array[String], pattern_type : GrepPatternType) -> Unit raise
    GitError