# multipull

Multipull keeps every multi-repo project up to date with one fast, parallel git pull. It scans the given directory, finds direct subdirectories that are git repositories, and runs the same two commands for each of them:

```
git status --short --branch
git pull --ff-only
```

## Build

```
cargo build --release
```

The release binary is written to `target/release/multipull`.

## Install

The easiest way to install the latest published release is from crates.io:

```
cargo install multipull
```

It copies the binary into `$CARGO_HOME/bin` (default `~/.cargo/bin`). Ensure that directory is on your PATH.

## Usage

```
multipull [ROOT] [--dry-run] [--confirm] [--sort-by <name|duration>]
```

`ROOT` defaults to the current working directory. Multipull only touches the first level of directories inside `ROOT`.

### Options

- `--dry-run`: print the git commands that would be executed without running them.
- `--confirm`: prompt once before running git commands (fails if stdin is not a TTY).
- `--sort-by`: choose `name` (default) or `duration` for the summary table.

### Progress behavior

- When stdout is a TTY, Multipull shows a progress bar and per-repo status lines.
- When stdout is not a TTY (e.g., redirected to a file/CI logs), it emits a simple, deterministic per-repo line followed by the full command output.

### Summaries and timings

After processing, Multipull prints a summary table with repo name, status, exit code, and per-repo duration, plus total runtime. Sort with `--sort-by`.

Multipull exits with a non-zero status if any repository command fails.
