@kova1/pullr 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -8
- package/bin/pullr +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/kova1max/homebrew-tap)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Safe, fast-forward pull every git repository under a directory.
|
|
9
9
|
|
|
10
10
|
Built for workspaces made of many independent repositories, where keeping
|
|
11
11
|
everything current means `cd`-ing into each one.
|
|
@@ -40,9 +40,6 @@ To try it without installing anything:
|
|
|
40
40
|
npx @kova1/pullr --dry-run ~/work
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Or copy [`bin/pullr`](bin/pullr) anywhere on your `PATH` - it is a single bash
|
|
44
|
-
script with no dependencies beyond `git`.
|
|
45
|
-
|
|
46
43
|
Every release is also mirrored to
|
|
47
44
|
[GitHub Packages](https://github.com/kova1max/pullr/pkgs/npm/pullr) as
|
|
48
45
|
`@kova1max/pullr` (GitHub requires the repo owner as scope). Installing from
|
|
@@ -74,10 +71,10 @@ first. It will never:
|
|
|
74
71
|
pullr [options] [DIR]
|
|
75
72
|
```
|
|
76
73
|
|
|
77
|
-
| Option | Default | Meaning |
|
|
78
|
-
|
|
|
79
|
-
| `DIR` | current
|
|
80
|
-
| `-j`, `--jobs N` | `
|
|
74
|
+
| Option | Default | Meaning |
|
|
75
|
+
| :--- | :--- | :--- |
|
|
76
|
+
| `DIR` | current directory | Where to look for repositories |
|
|
77
|
+
| `-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. |
|
|
81
78
|
| `--max-depth N` | `2` | How many directory levels below `DIR` to search. `0` = only `DIR` itself, `1` = `DIR` and its direct children, ... |
|
|
82
79
|
| `-n`, `--dry-run` | | Show what a run would do without pulling, see below |
|
|
83
80
|
| `-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. |
|
|
@@ -117,6 +114,27 @@ remote as it is now, then prints the same lines a real run would (with
|
|
|
117
114
|
only updates remote-tracking refs: the working tree and current branch are
|
|
118
115
|
never modified. Exit codes match a real run.
|
|
119
116
|
|
|
117
|
+
## How it compares
|
|
118
|
+
|
|
119
|
+
| | pullr | [gita](https://github.com/nosarthur/gita) | [gitup](https://github.com/earwig/git-repo-updater) | [myrepos](https://myrepos.branchable.com) (`mr`) | [mani](https://github.com/alajmo/mani) |
|
|
120
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
121
|
+
| Needs | bash and git | Python 3.8+ | Python 3.10+ | Perl | Go binary |
|
|
122
|
+
| Finds repos | scans a directory | register first (`gita add`) | scans a directory | register first (`~/.mrconfig`) | register first (`mani.yaml`) |
|
|
123
|
+
| Pulls in parallel | 8 at a time by default | all at once, no limit | no | opt-in | opt-in |
|
|
124
|
+
| Update | fetch + fast‑forward | `git pull` | fetch + fast‑forward | `git pull` | no built-in pull |
|
|
125
|
+
| Merge commits | never | depends on your git config | never | depends on your git config | depends on your command |
|
|
126
|
+
| Local changes in the way | reported as dirty | git's error | skipped | git's error | - |
|
|
127
|
+
| Dry run | yes | no | no | no | prints commands |
|
|
128
|
+
|
|
129
|
+
**Why "8 at a time" and not "all at once".** Many self-hosted git servers
|
|
130
|
+
limit how many SSH connections can be opening at the same time; OpenSSH's
|
|
131
|
+
default (`MaxStartups 10:30:100`) starts refusing them past 10. Fetching
|
|
132
|
+
every repository at once then fails for reasons that have nothing to do with
|
|
133
|
+
your repositories. On a self-hosted GitLab with 61 repositories, 16 parallel
|
|
134
|
+
fetches produced 6-9 of those spurious failures and 32 produced 10-14, while
|
|
135
|
+
8 produced none. GitHub itself handled 64 at once without errors, so raise
|
|
136
|
+
`-j` freely there.
|
|
137
|
+
|
|
120
138
|
## License
|
|
121
139
|
|
|
122
140
|
[MIT](LICENSE)
|
package/bin/pullr
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Usage: pullr [--jobs N] [--max-depth N] [--dry-run] [--rebase] [--no-color] [DIR]
|
|
4
4
|
set -euo pipefail
|
|
5
5
|
|
|
6
|
-
VERSION="0.
|
|
6
|
+
VERSION="0.6.0" # set by the release workflow
|
|
7
7
|
|
|
8
8
|
usage() {
|
|
9
9
|
cat <<'EOF'
|
|
@@ -13,7 +13,7 @@ Finds git repositories under DIR (default: current directory) and runs
|
|
|
13
13
|
`git pull --ff-only` in each. Does not descend into a repository once found.
|
|
14
14
|
|
|
15
15
|
Options:
|
|
16
|
-
-j, --jobs N Work on up to N repositories in parallel (default:
|
|
16
|
+
-j, --jobs N Work on up to N repositories in parallel (default: 8).
|
|
17
17
|
Output is buffered per repository and printed in order.
|
|
18
18
|
With N > 1 git never prompts for credentials.
|
|
19
19
|
--max-depth N How many directory levels below DIR to search (default: 2).
|
|
@@ -32,7 +32,7 @@ EOF
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
mode=pull
|
|
35
|
-
jobs=
|
|
35
|
+
jobs=8
|
|
36
36
|
rebase=0
|
|
37
37
|
color=1
|
|
38
38
|
max_depth=2
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kova1/pullr",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Safe, fast-forward pull every git repository under a directory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|
|
7
7
|
"pull",
|