Skip to content

feat(git): p10k symbols, two-tier defaults, branch glyph and divergence - #16

Closed
jals1212 wants to merge 1 commit into
feat/color-rolesfrom
feat/git-style
Closed

jals1212 wants to merge 1 commit into
feat/color-rolesfrom
feat/git-style

Conversation

@jals1212

@jals1212 jals1212 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Restyles the native git module (stacked on #15 — merges after it):

  • Powerlevel10k-minimal output: main ✓ clean; main ⇡2 ⇣1 ✖1 +2 !3 −1 ?2 diverged and dirty — branch glyph concatenated onto the name (E0A0's own right bearing is the gap), symbol-before-count groups in fixed order (conflicts, staged, modified, deleted, untracked), zero groups omitted. The old global dirty marker is gone: the counts say dirty, the accent escalation says it in colour.
  • Upstream divergence: ⇡N/⇣N parsed from the porcelain -b header, shown only when nonzero. Divergence never triggers the dirty escalation (work-tree only) — a diverged-but-clean tree keeps the resting accent. No remote name, no stash — kept simple by design.
  • Two-tier symbol defaults: every symbol (branch, clean, conflict, staged, modified, deleted, untracked, ahead, behind) has a glyph default and a plain-ASCII default ((empty) ok x + ! - ? ^ v), selected through the leading_show cascade — label/off means "no icons wanted" and degrades the whole set. An explicit @themux_git_symbol_* always wins.
  • Module icon default is the git logo 󰊢.

Changes

File Change
modules/git.conf Icon, nine two-tier symbol defaults, @_tmx_git_plain flag from the leading_show cascade, 10-arg script invocation
utils/git_status.sh Symbol-first formatting, divergence header parse, positional symbol args (${2-} honours the designed-empty branch symbol)
tests/git_module.sh (+expected) Both tiers, divergence fixtures (local upstream, no network, identity-safe), byte-exact branch-symbol assertion, clean-but-diverged --dirty=0
docs/reference/status-line.md Output shape, symbol table with both tiers, divergence and escalation notes

Test plan

  • Full suite green: run_tests.sh — 17/17
  • shellcheck -a clean
  • Fresh adversarial review: no CRITICAL findings; header parsing verified safe against adversarial branch names (refnames cannot contain space or [); conflict/divergence fixtures deterministic and CI-identity-safe
  • Glyph bytes verified exactly (icon f3 b0 8a a2, branch ee 82 a0, deleted U+2212)

Notes

  • The @themux_all_leading_show tier is documented as only reachable when the module tier is unset (stock options bake icon at the module tier) — pre-existing cascade behaviour shared with the metric modules, called out in the conf comment; a repo-wide fix would follow the @themux_all_<prop> read-time pattern in a separate change.

@jals1212
jals1212 force-pushed the feat/git-style branch 3 times, most recently from 866fbaf to d9b0c7d Compare July 3, 2026 11:27
@jals1212
jals1212 deleted the branch feat/color-roles July 3, 2026 11:43
@jals1212 jals1212 closed this Jul 3, 2026
@jals1212
jals1212 deleted the feat/git-style branch July 3, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant