Skip to content

feat(tools): #466 delta (git-delta) opt-in installer - #501

Merged
primetimetank21 merged 2 commits into
developfrom
feat/466-delta-tool
Jul 13, 2026
Merged

feat(tools): #466 delta (git-delta) opt-in installer#501
primetimetank21 merged 2 commits into
developfrom
feat/466-delta-tool

Conversation

@primetimetank21

Copy link
Copy Markdown
Owner

feat(tools): #466 delta (git-delta) opt-in installer

Closes #466

Files Added / Modified

File Change
scripts/linux/tools/delta.sh New installer: apt-first (Ubuntu 22.04+), tarball fallback, macOS brew
scripts/windows/tools/delta.ps1 New installer: winget (dandavison.delta), scoop fallback
scripts/windows/setup.ps1 Wire delta into ToolRegistry (NOT DefaultTools)
.tool-versions Pin delta 0.19.2
tests/test_delta_installer.sh Parity test (bash)
tests/test_delta_installer_pwsh.ps1 Parity test (PowerShell)

Opt-in Wiring

Delta is NOT added to DEFAULT_TOOLS (Linux) or $DefaultTools (Windows).
It is wired only into the Windows $ToolRegistry (required for that platform's
explicit-registry model). On Linux, directory auto-discovery picks it up.

Selectable via --only=delta (Linux/macOS) or -Only 'delta' (Windows).

Git Config Applied (idempotent)

git config --global core.pager delta
git config --global interactive.diffFilter 'delta --color-only'
git config --global delta.navigate true
git config --global delta.dark true          # light-mode: set delta.dark false
git config --global merge.conflictStyle zdiff3

Version Pinned

delta 0.19.2 -- verified latest stable from
https://api.github.com/repos/dandavison/delta/releases/latest
(published 2026-03-28).

Linux tarball asset naming confirmed:
delta-0.19.2-x86_64-unknown-linux-gnu.tar.gz
delta-0.19.2-aarch64-unknown-linux-gnu.tar.gz

Tests (TDD -- RED then GREEN)

RED (pre-implementation):

  • T_delta_in_list FAIL (delta.ps1 not registered)
  • T_delta_gitconfig_iso FAIL (delta.ps1 not found)
  • T_delta_gitconfig_idem FAIL (delta.ps1 not found)
  • T_delta_not_default PASS (correctly opt-in even before implementation)

GREEN (post-implementation):

  • PowerShell suite: 4/4 PASS (run locally, confirmed)
  • Bash suite: RED confirmed by code-analysis (no WSL on this Windows machine);
    tests cover the same 4 scenarios with GIT_CONFIG_GLOBAL isolation.
    shellcheck: CLEAN (all SC2030/2031/2329 suppressions are intentional).

Existing test_setup_flags_pwsh.ps1: 36/36 PASS (no regressions).
PSScriptAnalyzer (CI paths: setup.ps1 + scripts/windows/setup.ps1): 0 issues.

ilkan2626 and others added 2 commits July 12, 2026 20:39
- scripts/linux/tools/delta.sh: apt-first (Ubuntu 22.04+), tarball fallback
  for older/non-apt Linux; brew for macOS. Version-aware idempotent install.
  apply_delta_git_config() is separately-testable via BASH_SOURCE guard.
- scripts/windows/tools/delta.ps1: winget (dandavison.delta), scoop fallback.
  Invoke-DeltaGitConfig() separately-testable function.
- scripts/windows/setup.ps1: delta wired into ToolRegistry only (NOT DefaultTools)
  -- opt-in, selectable via -Only 'delta'.
- .tool-versions: pin delta 0.19.2 (verified latest stable, 2026-03-28).
- tests/test_delta_installer.sh + tests/test_delta_installer_pwsh.ps1:
  parity test pair -- opt-in discovery, git-config isolation (GIT_CONFIG_GLOBAL),
  idempotency. RED confirmed pre-impl; GREEN 4/4 pwsh post-impl.

git config applied: core.pager=delta, interactive.diffFilter='delta --color-only',
delta.navigate=true, delta.dark=true (light-mode override documented in comment),
merge.conflictStyle=zdiff3.

Closes #466

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename Invoke-DeltaGitConfig -> Set-DeltaGitConfig (spec-consistency;
  approved PS verb). Add [CmdletBinding(SupportsShouldProcess)] to silence
  PSUseShouldProcessForStateChangingFunctions (0 issues on delta.ps1).
- Add trailing LF to scripts/linux/tools/delta.sh and
  tests/test_delta_installer.sh (POSIX text-file requirement).

PSScriptAnalyzer (delta.ps1): 0 issues.
PSScriptAnalyzer (CI paths setup.ps1 x2): 0 issues.
Parity suite: 4/4 pwsh PASS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@primetimetank21
primetimetank21 marked this pull request as ready for review July 13, 2026 01:01
@primetimetank21
primetimetank21 merged commit 578e07d into develop Jul 13, 2026
10 checks passed
@primetimetank21
primetimetank21 deleted the feat/466-delta-tool branch July 13, 2026 01:01
primetimetank21 added a commit that referenced this pull request Jul 25, 2026
* feat(tools): #466 delta (git-delta) opt-in installer

- scripts/linux/tools/delta.sh: apt-first (Ubuntu 22.04+), tarball fallback
  for older/non-apt Linux; brew for macOS. Version-aware idempotent install.
  apply_delta_git_config() is separately-testable via BASH_SOURCE guard.
- scripts/windows/tools/delta.ps1: winget (dandavison.delta), scoop fallback.
  Invoke-DeltaGitConfig() separately-testable function.
- scripts/windows/setup.ps1: delta wired into ToolRegistry only (NOT DefaultTools)
  -- opt-in, selectable via -Only 'delta'.
- .tool-versions: pin delta 0.19.2 (verified latest stable, 2026-03-28).
- tests/test_delta_installer.sh + tests/test_delta_installer_pwsh.ps1:
  parity test pair -- opt-in discovery, git-config isolation (GIT_CONFIG_GLOBAL),
  idempotency. RED confirmed pre-impl; GREEN 4/4 pwsh post-impl.

git config applied: core.pager=delta, interactive.diffFilter='delta --color-only',
delta.navigate=true, delta.dark=true (light-mode override documented in comment),
merge.conflictStyle=zdiff3.

Closes #466

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* refactor(tools): #466 rename Set-DeltaGitConfig + trailing newlines

- Rename Invoke-DeltaGitConfig -> Set-DeltaGitConfig (spec-consistency;
  approved PS verb). Add [CmdletBinding(SupportsShouldProcess)] to silence
  PSUseShouldProcessForStateChangingFunctions (0 issues on delta.ps1).
- Add trailing LF to scripts/linux/tools/delta.sh and
  tests/test_delta_installer.sh (POSIX text-file requirement).

PSScriptAnalyzer (delta.ps1): 0 issues.
PSScriptAnalyzer (CI paths setup.ps1 x2): 0 issues.
Parity suite: 4/4 pwsh PASS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Install delta (git-delta) as an opt-in tool

2 participants