pulli 0.2.7__tar.gz → 0.2.9__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.7 → pulli-0.2.9}/PKG-INFO +1 -1
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/__init__.py +1 -1
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/tree.py +16 -2
- {pulli-0.2.7 → pulli-0.2.9}/.gitignore +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/LICENSE +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/README.md +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/pyproject.toml +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/scripts/release.sh +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/cli.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/discovery.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/pull.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/spinner.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/status.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/src/pulli/update.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/tests/test_pulli.py +0 -0
- {pulli-0.2.7 → pulli-0.2.9}/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.9"
|
|
@@ -171,6 +171,20 @@ def _ahead_behind(node: RepoNode, C=lambda s, *c: s) -> str:
|
|
|
171
171
|
return f"{b} {a}"
|
|
172
172
|
|
|
173
173
|
|
|
174
|
+
def _highlight_line(line: str) -> str:
|
|
175
|
+
"""Cyan-wrap a whole line, surviving nested SGR resets.
|
|
176
|
+
|
|
177
|
+
Inner resets (e.g. the count's own cyan+bold) would end the outer cyan
|
|
178
|
+
mid-line and make the line render two-tone; re-apply the cyan after
|
|
179
|
+
each reset so the line stays one color throughout. Returns the input
|
|
180
|
+
unchanged when it carries no ANSI codes (color off) — nothing to
|
|
181
|
+
highlight then.
|
|
182
|
+
"""
|
|
183
|
+
if "\x1b[" not in line:
|
|
184
|
+
return line
|
|
185
|
+
return _CYAN + line.replace(_RESET, _RESET + _CYAN) + _RESET
|
|
186
|
+
|
|
187
|
+
|
|
174
188
|
def _repo_tail_parts(node: RepoNode, C) -> list[str]:
|
|
175
189
|
"""The status columns for a repo node, as a list of aligned-able parts.
|
|
176
190
|
|
|
@@ -337,7 +351,7 @@ def _build_flat_lines(
|
|
|
337
351
|
# it — so the whole line is highlighted (cyan) instead of just the
|
|
338
352
|
# count. Everything up to date stays quiet: no news takes no color.
|
|
339
353
|
if n.behind and not n.error:
|
|
340
|
-
line =
|
|
354
|
+
line = _highlight_line(line)
|
|
341
355
|
lines.append(line)
|
|
342
356
|
repo_line[id(n)] = len(lines) - 1
|
|
343
357
|
repo_base[id(n)] = padded
|
|
@@ -465,7 +479,7 @@ class LiveTree:
|
|
|
465
479
|
# Same highlight rule as _build_flat_lines: the whole line goes
|
|
466
480
|
# cyan when the repo is behind — that is the actionable state.
|
|
467
481
|
if self._flat and node.behind and not node.error:
|
|
468
|
-
text =
|
|
482
|
+
text = _highlight_line(text)
|
|
469
483
|
text = _clip_ansi(text, self._width)
|
|
470
484
|
with self._lock:
|
|
471
485
|
self._rewrite(i, text)
|
|
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
|