Skip to content

Sandbox the global git config in git-lfs specs - #762

Open
mokagio wants to merge 2 commits into
trunkfrom
mokagio/lfs-spec-global-config
Open

Sandbox the global git config in git-lfs specs#762
mokagio wants to merge 2 commits into
trunkfrom
mokagio/lfs-spec-global-config

Conversation

@mokagio

@mokagio mokagio commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

My global .gitconfig, which I manage via a Git-tracked dotfiles repo, kept showing the LFS block removed and I couldn't understand why.

Asked Opus 5 and it quickly figured out the reason was the release-toolkit LFS tests. This PR sandboxs them so they don't modify the global Git configurations.

`git lfs install` and `git lfs uninstall` default to the global scope, so these
two examples were writing to — and then deleting — the `[filter "lfs"]` section
of the developer's real `~/.gitconfig` on every run of the suite.

Passing `--local` would not have been enough: `has_git_lfs?` reads every config
scope, so the negative example would start failing on any machine that legitimately
has global git-lfs filters configured.
Pointing `GIT_CONFIG_GLOBAL` at a throwaway file keeps both examples exercising
the same code path while confining the writes.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 30, 2026 01:25
@mokagio mokagio self-assigned this Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mokagio
mokagio enabled auto-merge July 30, 2026 01:35
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.

2 participants