pulli 0.2.10__tar.gz → 0.2.11__tar.gz
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.
- {pulli-0.2.10 → pulli-0.2.11}/PKG-INFO +1 -1
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/__init__.py +1 -1
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/status.py +12 -6
- {pulli-0.2.10 → pulli-0.2.11}/.gitignore +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/LICENSE +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/README.md +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/pyproject.toml +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/scripts/release.sh +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/cli.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/discovery.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/pull.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/spinner.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/state.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/style.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/tree.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/src/pulli/update.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/tests/test_pulli.py +0 -0
- {pulli-0.2.10 → pulli-0.2.11}/uv.lock +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""pulli — discover git repos under a root and report their status."""
|
|
2
|
-
__version__ = "0.2.
|
|
2
|
+
__version__ = "0.2.11"
|
|
@@ -157,22 +157,28 @@ def _remote_url(repo: Path, env: dict[str, str] | None = None) -> str:
|
|
|
157
157
|
def _is_fork(repo: Path, env: dict[str, str] | None = None) -> bool:
|
|
158
158
|
"""True when the repo looks like a fork.
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
Two signals, either one is enough:
|
|
161
|
+
1. a remote named `upstream` — the documented GitHub convention for
|
|
162
|
+
"the repo I forked from";
|
|
163
|
+
2. remotes pointing at the same repo *name* under different *owners*
|
|
164
|
+
(`devskale/rodney` + `simonw/rodney`), compared case-insensitively.
|
|
165
|
+
|
|
166
|
+
Name comparison alone misses forks whose copy was renamed
|
|
167
|
+
(`devskale/handyST` forked from `cjpais/Handy`) — hence signal 1.
|
|
164
168
|
"""
|
|
165
169
|
remotes = _git_one(repo, "remote", env=env).split()
|
|
166
170
|
if len(remotes) < 2:
|
|
167
171
|
return False
|
|
172
|
+
if "upstream" in remotes:
|
|
173
|
+
return True
|
|
168
174
|
owners: set[str] = set()
|
|
169
175
|
names: set[str] = set()
|
|
170
176
|
for name in remotes:
|
|
171
177
|
url = _git_one(repo, "remote", "get-url", name, env=env)
|
|
172
178
|
owner, rname = _owner_repo(url)
|
|
173
179
|
if rname:
|
|
174
|
-
owners.add(owner)
|
|
175
|
-
names.add(rname)
|
|
180
|
+
owners.add(owner.lower())
|
|
181
|
+
names.add(rname.lower())
|
|
176
182
|
# same repo name under more than one owner = a fork and its parent
|
|
177
183
|
return len(names) == 1 and len(owners) >= 2
|
|
178
184
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|