affected

Crates.ioaffected
lib.rsaffected
version0.1.2
sourcesrc
created_at2024-11-08 22:37:29.791963
updated_at2024-11-10 01:14:26.834459
descriptionA tool to find affected files or projects in a git repository
homepage
repositoryhttps://github.com/DenysVuika/affected.git
max_upload_size
id1441650
size38,100
Denys Vuika (DenysVuika)

documentation

README

affected

A tool to find affected files or projects in a git repository.

Installation

From Crates.io

cargo install affected

Usage

The format of the command is:

Usage: affected [OPTIONS] <COMMAND>

Commands:
  files     
  projects  
  help      Print this message or the help of the given subcommand(s)

Options:
      --repo <REPO>  Optional repo path, defaults to current directory
      --base <BASE>  Base of the current branch (usually main). Falls back to 'main' or 'master' if not provided
  -h, --help         Print help

Example

For the feature branch checked out, and the main branch is develop:

# List all affected files in the current repository
affected --base=develop files list

# List all affected files in a different repository
affected --repo=/path/to/repo --base=develop files list

Log Levels

The log level can be set using the LOG_LEVEL environment variable.

export LOG_LEVEL=DEBUG
affected [OPTIONS] <COMMAND>

The following log levels are available:

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR

The default log level is INFO.

Local Development

Linking the binary for global use:

cargo build
sudo ln -s $(pwd)/target/debug/affected /usr/local/bin/affected
Commit count: 59

cargo fmt