Skip to content

fix: disable LFS for disabled repos - #44

Merged
alecthomas merged 2 commits into
mainfrom
aat/disable-lfs-integration
Sep 23, 2026
Merged

alecthomas merged 2 commits into
mainfrom
aat/disable-lfs-integration

Conversation

@alecthomas

Copy link
Copy Markdown
Collaborator

Disabled repositories currently continue to run the git-lfs underlay even though their other repository-specific hooks are suppressed. This makes lhm disable incomplete for repositories that use LFS.

This change omits underlay integrations from both dry-run config resolution and actual hook execution while preserving system and user hooks. Re-enabling the repository restores the LFS integration. End-to-end coverage verifies both execution paths and the enable transition.

The pre-push suite also exposed that Git hook environment variables could override explicit repository targets. Repository-scoped Git commands now clear those variables before applying -C, which keeps runtime lookups and temporary-repository tests isolated.

Verified by the pre-push lint and full test hooks.

Disabled repositories should not run repository integrations. Omit the LFS underlay while preserving system and user hooks, and restore it when the repository is re-enabled.
Git exports repository-local environment variables to hooks, which can override an explicit -C target. Clear those variables so lhm and its tests always operate on the requested repository.
@alecthomas
alecthomas marked this pull request as ready for review September 22, 2026 23:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T00:00:51.700141Z 68f21aa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@alecthomas
alecthomas merged commit 40f0d60 into main Sep 23, 2026
6 checks passed
@alecthomas
alecthomas deleted the aat/disable-lfs-integration branch September 23, 2026 00:03
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