feat(helpers4-common): warn about unfixable host-bound git config paths - #90
Merged
Merged
Conversation
…aths
git-config-self-heal.sh only ever fixed shell-out keys (PATH-searchable) and
an SSH signing key (derivable from the forwarded agent). core.hooksPath,
core.excludesfile, core.attributesfile, and include.path/includeIf.*.path
all point at a file or directory that only ever existed on the host, with no
equivalent recovery path — so this adds a warning-only check for all four,
never a fix, matching the script's existing best-effort/never-fails
contract.
git config --file never follows includes, so an included file's own
contents (if it even exists) stay invisible to every check in this script —
this can only confirm whether the included file itself is present, not
inspect what it sets. Documented in both the script and the README.
Verified locally end-to-end against the real installed common.sh and
git-config-self-heal.sh (not just the install.sh generator): missing
hooksPath/excludesfile/include.path/includeIf.*.path each warn without
failing, an existing path is correctly left alone, and a config with none of
these keys is a silent no-op. Caught and fixed a real regex bug along the
way — git normalizes includeIf's key to lowercase ("includeif", not
"includeIf"), so the first version of the includeIf check never matched
anything.
Also fixed the shell-out key list in the README, which still said
"core.editor" without core.sshCommand, added in a prior release.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ PR Validation Passed
📋 Pipeline Status
🤖 Generated by @helpers4 CI • 2026-09-08 |
1.3.0 implied new functionality. This only adds diagnostic warnings for paths self-heal already couldn't do anything about — nothing it fixes or enables changed. Patch-level: 1.2.0 -> 1.2.1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git-config-self-heal.shonly ever fixed shell-out keys (PATH-searchable) and an SSH signing key (derivable from the forwarded agent).core.hooksPath,core.excludesfile,core.attributesfile, andinclude.path/includeIf.*.pathall point at a file or directory that only ever existed on the host, with no equivalent recovery path — adds a warning-only check for all four, matching the script's existing best-effort/never-fails contract.git config --filenever follows includes, so an included file's own contents (if it even exists) stay invisible to every check in this script — this can only confirm whether the included file itself is present. Documented in both the script and the README.core.sshCommand(added in a prior release and never backfilled there).1.2.0→1.2.1), not minor: this only adds diagnostic warnings for paths self-heal already couldn't do anything about — nothing it fixes or enables changed.Verified end-to-end, not just unit-style: installed the real generated
common.shandgit-config-self-heal.shat their actual/usr/local/share/helpers4/path and ran the fulltest/helpers4-common/test.shagainst them. Caught and fixed a real bug this way — git normalizesincludeIf's key to lowercase (includeif, notincludeIf), so the first version of that check never matched anything.Board card: "Self-heal: warn on host-bound config paths that can't be repaired (hooksPath, excludesfile, includeIf)" (Backlog, Low priority).
Test plan
bash -nsyntax check, JSON validatedtest/helpers4-common/test.sh🤖 Generated with Claude Code