Repository navigation
Conversation
bompus
force-pushed
the
fix/landing-keep-ignored-files
branch
from
November 3, 2026 00:08
ff9b485 to
bf7a71a
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files
branch
2 times, most recently
from
November 3, 2026 00:40
49b6e67 to
c6a5cf2
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files
branch
from
November 3, 2026 00:54
db52088 to
798f17b
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files
branch
from
November 3, 2026 01:10
798f17b to
b5dd3ee
Compare
…al squash The landing helper's fast-forward runs with --no-overwrite-ignore, so a landing no longer replaces an ignored local file (the checkout is skipped with fast-forward refused and exit 3), and the core landing rule and references give the same flag in their direct fast-forward commands. The option does not protect a squash of a diverged branch, so the squash reference now uses scripts/squash-land.sh: it builds the squash commit from the merge result with git merge-tree and git commit-tree, leaving the checkout untouched, and applies it with git merge --ff-only --no-overwrite-ignore, which Git itself refuses when it would replace an ignored or untracked local file. Tests with real diverged branches cover the squash, an ignored file, an untracked file, a file or symlink where a directory is needed, a directory turned into a file, a subdirectory, a conflict, a branch that adds nothing and a checkout with no commit.
bompus
force-pushed
the
fix/landing-keep-ignored-files
branch
from
November 3, 2026 01:22
b5dd3ee to
bbadf4d
Compare
Owner
Author
|
Replaced by #540: same single commit and tree, so the bot reviews the squash-land.sh design from round 1 (this PR reached the bot's six-review limit). |
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.
verify-landed.sh --fffast-forwards a clean default checkout withgit merge --ff-only. Git replaces an ignored untracked file silently when the incoming commit adds a tracked file at the same path, and the helper's clean-tree check (status --untracked-files=no) does not look at ignored files. A landing could therefore destroy a local.env-style file that exists nowhere else.The merge now runs with
--no-overwrite-ignore. The checkout is skipped withsync skipped at <path>: fast-forward refused: ...and exit 3, the same path an overwritten non-ignored untracked file already takes, and the ignored file is untouched.Proof:
HEADis unchanged and the file content survives.bun test skills/hr-pr-followup: 234 pass, 0 fail.shellcheckandshfmt -i 2 -bn -ci --diffon the script: clean.oxfmt --checkon the changed files: clean.--no-overwrite-ignorealso stops an ignored file with a leading space in its name, a dangling symlink and a pathspec-like name, which I checked by hand withgit merge --ff-only --no-overwrite-ignore.