Repository navigation
Commit 3a552c5
* Start fix for gitignored vendored gem files
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
* Test that a vendored gem dir commits whole
Four of the five cases fail on main: a file of a plain gem's vendored
directory that an ignore rule matches is left out of the commit, a
rule that ignores the vendored dir is not refused, a .gitignore the
gem ships keeps its rules, and the uuid dir gets no git metadata.
The fifth pins what repair does for a copy vendored before the fix.
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
* Keep a vendored gem dir whole in the commit
A gem vendored as its own directory got none of the ignore handling a
gem vendored as platform gems has, so a project rule (the .rspec of
GitHub's Rails.gitignore) or a .gitignore the gem ships left files of
the copy out of the commit. Every fresh clone then failed
vendor --check and vex with vendor_inventory_mismatch.
Every vendored gem now gets the uuid dir's .gitignore and
.gitattributes, has the .gitignore files it ships emptied in the
copy, and is refused (vendor_artifact_gitignored) when git would
still leave a file out. An in-sync re-run and repair put the pair
back. Repair keeps a shipped .gitignore that the ledger inventory of
an earlier release recorded, so such a copy still verifies.
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
* Prove a vendored gem dir through a git clone
A real-Bundler case commits and clones a project whose .gitignore
has the .rspec rule of GitHub's Rails.gitignore, with a gem that
ships that file (diff-lcs 1.5.1). The clone holds the whole copy,
vendor --check passes there, and a frozen bundle install loads the
patched gem. It fails against main's backend.
The CLI contract and the ecosystem guide now describe the uuid dir's
git metadata and the emptied .gitignore for every vendored gem.
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
* Empty only a gem .gitignore that hides files
Review findings on the vendored gem dir fix.
A gem can ship a .gitignore as data (a template it copies into new
projects). In a gem's own tree only a .gitignore whose rules match a
file of the copy is emptied now; the rest stay byte for byte. Repair
restores each one as the ledger inventory records it.
A copy that an earlier release vendored keeps the gem's .gitignore as
shipped. The in-sync run that writes the uuid dir's pair for it now
warns vendor_gem_copy_gitignored when git would still leave a file
out, and names git add -f. Repair writes the pair for a healthy copy
too, as the docs say.
The check for a rule that ignores the uuid dir moved behind the Bazel
hub branch, so a gem committed as its archive is asked what it was
asked before.
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
* Read a shipped .gitignore the way git does
The check for whether a .gitignore the gem ships hides a file asked
about the file before its directories, so a negation looked like it
re-included a file under an ignored directory. Git never looks inside
such a directory. The copy then kept that .gitignore, and the fresh
vendor refused the gem where it could have emptied the file.
Directories are now asked top-down, first match settles it.
Refs #2348.
Assisted-by: Claude Code:claude-fable-5-2
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7beca2f commit 3a552c5
6 files changed
Lines changed: 995 additions & 105 deletions
File tree
- crates
- socket-patch-cli
- src/commands/vendored_backend
- tests
- socket-patch-core/src/vendor
- docs
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | | - | |
522 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
523 | 525 | | |
524 | 526 | | |
525 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4121 | 4121 | | |
4122 | 4122 | | |
4123 | 4123 | | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
| 4174 | + | |
| 4175 | + | |
| 4176 | + | |
| 4177 | + | |
| 4178 | + | |
| 4179 | + | |
| 4180 | + | |
| 4181 | + | |
| 4182 | + | |
| 4183 | + | |
| 4184 | + | |
| 4185 | + | |
| 4186 | + | |
| 4187 | + | |
| 4188 | + | |
| 4189 | + | |
| 4190 | + | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
| 4255 | + | |
| 4256 | + | |
| 4257 | + | |
| 4258 | + | |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
| 4262 | + | |
| 4263 | + | |
| 4264 | + | |
| 4265 | + | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
| 4302 | + | |
| 4303 | + | |
| 4304 | + | |
| 4305 | + | |
| 4306 | + | |
| 4307 | + | |
| 4308 | + | |
| 4309 | + | |
| 4310 | + | |
| 4311 | + | |
| 4312 | + | |
| 4313 | + | |
| 4314 | + | |
| 4315 | + | |
4124 | 4316 | | |
4125 | 4317 | | |
4126 | 4318 | | |
| |||
0 commit comments