Repository navigation
Conversation
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
2 times, most recently
from
November 3, 2026 01:46
482e438 to
9219f67
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
from
November 3, 2026 02:04
9219f67 to
4553f3e
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
2 times, most recently
from
November 3, 2026 02:19
724bef4 to
38ee6ba
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
from
November 3, 2026 02:34
38ee6ba to
6d3f1e5
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
from
November 3, 2026 04:13
6d3f1e5 to
a1b7bad
Compare
bompus
force-pushed
the
fix/landing-keep-ignored-files-v2
branch
6 times, most recently
from
November 3, 2026 16:13
e5bc053 to
6316c39
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-v2
branch
from
November 3, 2026 16:29
6316c39 to
e946f70
Compare
Owner
Author
|
Closed under the owner's 2026-11-03 rule (Question 153, option 153b): the fourth independent Sol read of this helper found one more data-loss case (an awk failure on PATH still counted as 'no gitlink'; every git failure was already fail-closed). The branch fix/landing-keep-ignored-files-v2 at e946f70 is kept, with a 14-line fix described in the review, and the old landing text stays. Reopening needs the owner's say. Reads: 1 four findings (one high), 2 four (one high), 3 one data-loss plus two fail-safe, 4 (this) one data-loss. |
Closed
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.
This replaces #537, whose review bot reached its six-review limit. The commit here is #537's final head, one commit on
main; the design changed during #537's review, so the bot has not seen it from the start.The landing helper's fast-forward could silently replace an ignored local file (for example a
.env) when the incoming commit adds a tracked file at the same path, because its clean-tree check does not look at ignored files.verify-landed.sh --ffand the directgit merge --ff-onlycommands in the core landing rule and the landing and squash-landing references now pass--no-overwrite-ignore. The checkout is skipped withfast-forward refusedand exit 3, and the file is untouched.--no-overwrite-ignoredoes not protectgit merge --squashof a diverged branch (reproduced on Git 2.56.0: the three-way merge replaces the ignored file and exits 0). The squash reference now usesskills/hr-pr-followup/scripts/squash-land.sh <branch> "<message>". It builds the squash in a throwaway worktree ofHEAD, which holds none of the checkout's ignored files, with a normalgit merge --squashandgit commit(so the repository's commit hooks run; a rejecting hook exits 1 and changes nothing), and applies the commit withgit merge --ff-only --no-overwrite-ignore. Git refuses that at the moment it writes when it would replace an ignored or untracked local file, so there is no scan to get wrong and no gap to race. Exit 1: refused, nothing changed; exit 2: usage error, no commit in HEAD, or a conflict.Verified by hand in scratch repositories: the ff-only form refuses an ignored file at the same path, an ignored file or symlink where a directory is needed, and a tracked directory turned into a file with an ignored file inside.
Proof:
bun run checkpasses; the node tests pass, and the skill tests also pass with no global Git config.squash-land.test.jsuses real diverged branches: the squash itself, an ignored file, an untracked file, a file or symlink where a directory is needed, a directory turned into a file with ignored files inside, a subdirectory, a conflict, a branch that adds nothing, a rejecting hook, a message-rewriting hook and a checkout with no commit. An earlier version scanned for collisions first; the review found a series of ways it could miss one, so it was replaced by letting Git refuse the write. An independent DeepSeek review found no way to replace the contents of an ignored, untracked or modified local file. It did find, and this head fixes, three things: amerge.ffsetting turned every run into a false "conflict"; hooks in an ignoredcore.hooksPathdirectory were skipped in the throwaway worktree; and a failed worktree checkout exited outside the documented codes. It also showed that the final step is not atomic (a held ref lock or an unwritable directory can leave files updated while the branch does not move), so the script and the reference no longer claim "nothing changed" for that step and tell the caller to checkgit status.