Skip to content

chore(git): never merge a lockfile - #2

Merged
maxholman[bot] merged 1 commit into
mainfrom
chore/never-merge-lockfiles
Oct 19, 2026
Merged

maxholman[bot] merged 1 commit into
mainfrom
chore/never-merge-lockfiles

Conversation

@maxholman

@maxholman maxholman Bot commented Oct 17, 2026

Copy link
Copy Markdown

Git no longer merges a lockfile line by line. When a branch and its base both change pnpm-lock.yaml or Cargo.lock, the merge stops at a conflict, so the lockfile is regenerated by its package manager instead of being stitched together into something that can disagree with the manifests. csp already has the same rule.

Verified by hand: git check-attr merge reports unset for every lockfile in the repo, nested ones included. In a scratch repo, two edits to different lines of a lockfile merge silently without the rule and stop at a conflict with it.

A lockfile merged line by line can disagree with its manifests while
looking clean, so a conflicting change stops instead and is regenerated.

Co-Authored-By: LLM <noreply@block65.dev>
@maxholman
maxholman Bot merged commit 0ce65d5 into main Oct 19, 2026
1 check passed
@maxholman
maxholman Bot deleted the chore/never-merge-lockfiles branch October 19, 2026 08:32
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