diff --git a/README.md b/README.md index 4b5e3da..daaa25d 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ pullr [options] [DIR] | Option                       | Default | Meaning | | :--- | :--- | :--- | | `DIR` | current directory | Where to look for repositories | -| `-j`, `--jobs N` | `4` | Work on up to `N` repositories in parallel. Output is buffered per repository and printed in discovery order, so it reads the same as a sequential run. With `N > 1` git never prompts for credentials; use `--jobs 1` for repositories that need an interactive login. | +| `-j`, `--jobs N` | `8` | Work on up to `N` repositories in parallel. Output is buffered per repository and printed in discovery order, so it reads the same as a sequential run. With `N > 1` git never prompts for credentials; use `--jobs 1` for repositories that need an interactive login. | | `--max-depth N` | `2` | How many directory levels below `DIR` to search. `0` = only `DIR` itself, `1` = `DIR` and its direct children, ... | | `-n`, `--dry-run` | | Show what a run would do without pulling, see below | | `-r`, `--rebase` | off | Rebase local commits onto the upstream instead of refusing a diverged branch (`git pull --rebase`). A rebase that hits a conflict is aborted and the repository is left as it was. | @@ -120,13 +120,13 @@ never modified. Exit codes match a real run. | :--- | :--- | :--- | :--- | :--- | :--- | | Needs | bash and git | Python 3.8+ | Python 3.10+ | Perl | Go binary | | Finds repos | scans a directory | register first (`gita add`) | scans a directory | register first (`~/.mrconfig`) | register first (`mani.yaml`) | -| Pulls in parallel | 4 at a time by default | all at once, no limit | no | opt-in | opt-in | +| Pulls in parallel | 8 at a time by default | all at once, no limit | no | opt-in | opt-in | | Update | fetch + fast‑forward | `git pull` | fetch + fast‑forward | `git pull` | no built-in pull | | Merge commits | never | depends on your git config | never | depends on your git config | depends on your command | | Local changes in the way | reported as dirty | git's error | skipped | git's error | - | | Dry run | yes | no | no | no | prints commands | -**Why "4 at a time" and not "all at once".** Many self-hosted git servers +**Why "8 at a time" and not "all at once".** Many self-hosted git servers limit how many SSH connections can be opening at the same time; OpenSSH's default (`MaxStartups 10:30:100`) starts refusing them past 10. Fetching every repository at once then fails for reasons that have nothing to do with diff --git a/bin/pullr b/bin/pullr index eb598ec..1f24ee5 100755 --- a/bin/pullr +++ b/bin/pullr @@ -13,7 +13,7 @@ Finds git repositories under DIR (default: current directory) and runs `git pull --ff-only` in each. Does not descend into a repository once found. Options: - -j, --jobs N Work on up to N repositories in parallel (default: 4). + -j, --jobs N Work on up to N repositories in parallel (default: 8). Output is buffered per repository and printed in order. With N > 1 git never prompts for credentials. --max-depth N How many directory levels below DIR to search (default: 2). @@ -32,7 +32,7 @@ EOF } mode=pull -jobs=4 +jobs=8 rebase=0 color=1 max_depth=2 diff --git a/test/pullr.bats b/test/pullr.bats index 9d3a846..fffebc1 100644 --- a/test/pullr.bats +++ b/test/pullr.bats @@ -390,3 +390,9 @@ make_blocked() { [ "$(git -C ws/both rev-parse HEAD)" = "$before" ] [ "$(cat ws/both/file)" = "local" ] } + +@test "runs 8 jobs at a time by default" { + run pullr --help + [[ "$output" == *"(default: 8)"* ]] + grep -q '^jobs=8$' "$PULLR" +}