Skip to content

Support safe.bareRepository=explicit in git sources - #9876

Open
hsbt wants to merge 1 commit into
masterfrom
claude/determined-pike-9d2762
Open

hsbt wants to merge 1 commit into
masterfrom
claude/determined-pike-9d2762

Conversation

@hsbt

@hsbt hsbt commented Sep 15, 2026

Copy link
Copy Markdown
Member

With safe.bareRepository=explicit in the git config, every Gemfile with a git: source fails. bundle lock, bundle install and bundle outdated all stop with fatal: cannot use bare repository, because Bundler runs git with -C against its bare cache clone and git refuses to discover a bare repository that way.

Bare repositories are now passed with --git-dir, as suggested in the issue. Working trees keep -C, since a local override points at a checkout that --git-dir cannot open. Nothing changes for users without this setting.

The new spec installs and updates a git gem under this setting and fails on master.

Fixes #7515

Generated with Claude Code

Under that setting git refuses to discover a bare repository through -C,
so every command run against the bare cache clone failed. Bare
repositories are now passed with --git-dir, while working trees such as
local overrides keep -C.

#7515

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the claude/determined-pike-9d2762 branch from 508dcc5 to 65b695c Compare September 15, 2026 10:40
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.

Bundler does not work with git config "safe.bareRepository=explicit"

1 participant