#repo #google #command #git-repository #managed #repo-tool #repo-status

bin+lib repo-utils

google's repo-tool 工具的实用程序

1 个不稳定版本

0.3.0 2022年10月14日

#23 in #managed

MIT 许可证

20KB
414

repo-utils

使用 Rust 编写的 google's repo-tool 工具的实用程序

一组用于在由 google's repo tool 管理的 git 仓库上工作的命令。

安装

repo-utils是用 Rust 编写的。您需要安装 Rust 工具链才能使用它

https://www.rust-lang.net.cn/tools/install

然后您只需使用以下命令安装最新的 repo-utils 版本

cargo install repo-utils

来自中央 crates.io 存储库

用法

repo-forall

Execute commands on git repositories managed by repo, see https://github.com/elektronenhirn/repo-utils

Usage: repo-forall [OPTIONS] [COMMAND]...

Arguments:
  [COMMAND]...

Options:
  -C, --cwd <DIR>           change working directory (mostly useful for testing)
  -m, --manifest <FILE>     ignore projects which are not defined in the given manifest file(s)
  -g, --group <GROUP>       ignore projects which are not part of the given group(s)
  -v, --verbose             Verbose output
  -f, --fail-fast           Stop running commands for anymore projects whenever one failed
  -p, --print-project-path  Print project path before printing command output
  -h, --help                Print help information
  -V, --version             Print version information

命令支持以下环境变量

  • REPO_PATH:项目相对路径

示例

repo-forall 'echo $REPO_PATH'

repo-status

Check if repos managed by git-repo have uncommited changes, see https://github.com/elektronenhirn/repo-utils

Usage: repo-status [OPTIONS]

Options:
  -C, --cwd <DIR>        change working directory (mostly useful for testing)
  -m, --manifest <FILE>  ignore projects which are not defined in the given manifest file(s)
  -g, --group <GROUP>    ignore projects which are not part of the given group(s)
  -v, --verbose          Verbose output, e.g. print local path before executing command
  -h, --help             Print help information
  -V, --version          Print version information

依赖项

~13–24MB
~386K SLoC