Conversation
Overcommit 0.71.0 resolves operation-state files (MERGE_HEAD, MERGE_MSG, MERGE_MODE) through `git rev-parse --git-common-dir`, which in a linked worktree points at the primary checkout's `.git` rather than the per-worktree directory where git actually writes them. store_merge_state therefore reads files that are not there, and restore_merge_state writes them back into the primary `.git`. Because clear_working_tree runs `git reset --hard` whenever overcommit stashes, a `git merge` followed by `git commit` from a linked worktree produces a single-parent commit whose subject still reads "Merge ...". Fixed upstream by sds/overcommit#887, released in v0.72.0, which adds Overcommit::Utils.git_path built on `git rev-parse --git-path` and routes the operation-state files through it. Gemfile.lock is gitignored here, so only the gemspec constraint changes. Locally the bump also tightens overcommit's own rexml dependency from >= 3.3.9 to >= 3.4.2 (CVE-2025-58767); the resolved rexml 3.4.4 already satisfied both.
apiology
marked this pull request as ready for review
September 4, 2026 00:22
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.
Claude:
Problem: In a
git worktree— the default working style for AI coding agents — merging and committing silently produces a commit that says it is a merge but that git does not record as one, so the branch still looks unmerged and gets merged again.Solution: Bump to overcommit 0.72.0, which carries sds/overcommit#887 — 0.71.0 looked for git's merge bookkeeping in the main checkout rather than the worktree's own.