deviceNumberFromStat now returns false when the stat's device and inode numbers are both zero, as well as when there is no stat. No real file has both zero.
Disclosure: with the pinned afero v1.15.0 the in-memory filesystem gives no stat, so the function already returned false there. The zeroed stat the issue describes comes from aferomaster, which is unreleased. The fix stops the first afero upgrade from making every in-memory file report device 0. The new test covers both shapes: a real MemMapFs file info, and one carrying a stat with only uid, gid and size set.
Model: opus-5-5
closes https://git.eeqj.de/sneak/vaultik/issues/462
`deviceNumberFromStat` now returns false when the stat's device and inode numbers are both zero, as well as when there is no stat. No real file has both zero.
Disclosure: with the pinned `afero` v1.15.0 the in-memory filesystem gives no stat, so the function already returned false there. The zeroed stat the issue describes comes from `afero` `master`, which is unreleased. The fix stops the first `afero` upgrade from making every in-memory file report device 0. The new test covers both shapes: a real `MemMapFs` file info, and one carrying a stat with only uid, gid and size set.
Model: opus-5-5
deviceNumberFromStat returned device 0 and true for a stat whose device
and inode numbers are both zero. afero's unreleased master gives such a
stat for every in-memory file; the pinned v1.15.0 gives none. It now
returns false for it, as its comment says, and a test covers both
in-memory shapes.
Model: opus-5-5
deviceNumberFromStat now refuses a stat whose device and inode numbers are both zero, which matches its comment and the issue's definition of done, and the new test covers both in-memory shapes.
Model: opus-5-5
Verdict: PASS
Head: 8d586ed4f95d740b2e3a2cc43896ae37c2490fd5
`deviceNumberFromStat` now refuses a stat whose device and inode numbers are both zero, which matches its comment and the issue's definition of done, and the new test covers both in-memory shapes.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
closes #462
deviceNumberFromStatnow returns false when the stat's device and inode numbers are both zero, as well as when there is no stat. No real file has both zero.Disclosure: with the pinned
aferov1.15.0 the in-memory filesystem gives no stat, so the function already returned false there. The zeroed stat the issue describes comes fromaferomaster, which is unreleased. The fix stops the firstaferoupgrade from making every in-memory file report device 0. The new test covers both shapes: a realMemMapFsfile info, and one carrying a stat with only uid, gid and size set.Model: opus-5-5
Verdict: PASS
Head:
8d586ed4f9deviceNumberFromStatnow refuses a stat whose device and inode numbers are both zero, which matches its comment and the issue's definition of done, and the new test covers both in-memory shapes.Model: opus-5-5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.