Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bin/pullr
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -32,7 +32,7 @@ EOF
}

mode=pull
jobs=4
jobs=8
rebase=0
color=1
max_depth=2
Expand Down
6 changes: 6 additions & 0 deletions test/pullr.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Loading