Crate gitall[][src]

Expand description

Crate gitall provides an simple API for recursively finding all Git directories below a given directory.

Example

The following code prints the directory paths of each Git directory located beneath the current directory:

use gitall::Giterator;
use std::default::Default;

let giterator = Giterator::default();
for direntry in giterator {
    println!("{}", direntry.path().display());
}

This snippet only finds Git directories whose name matches a regular expression:

use gitall::Giterator;
use regex::Regex;
use std::default::Default;

let giterator = Giterator::default().regex(Regex::new(r"some-pattern-.+").unwrap());
for direntry in giterator {
    println!("{}", direntry.path().display());
}

Check the Giterator documentation for more ways to filter results.

Structs

A builder to define how to search for Git directories.

An iterator for recursively finding Git directories.

Functions

Returns true if the directory represented by entry is a Git directory root.