Crate mrh

source ·
Expand description

mrh - Multi-(git)Repo Helper

A Git repo can be in a number of states where some pending actions may need to be taken:

  • uncommitted changes
  • unpushed commits
  • outdated branch
  • added files
  • deleted files
  • renamed files
  • untracked files (can be disabled)
  • uncommitted repos (can be disabled)
  • untagged HEAD (optional)
  • unpushed tags (optional)
  • unpulled tags (optional)
  • unfetched commits (optional)

This library is meant to inspect those states, given a root path as starting point.

Example:

mrh::Crawler::new(".")
    .pending(true)
    .ignore_untracked(true)
    .ignore_uncommitted_repos(true)
    .for_each(|output| println!("{:?}", output));

§Feature flags

  • cli: enabled by default, this allows building the CLI
  • json: useful only when cli feature is provided, this provides output in JSON format, to ease consumption by tools.

Structs§

  • Crawls the filesystem, looking for Git repos
  • Represents Crawler output