Skip to content

vendor: github.com/moby/go-archive v0.2.1#7119

Merged
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:bump_go_archive_0.2.1
Jul 24, 2026
Merged

vendor: github.com/moby/go-archive v0.2.1#7119
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:bump_go_archive_0.2.1

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

full diff: moby/go-archive@v0.2.0...v0.2.1

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

full diff: moby/go-archive@v0.2.0...v0.2.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This PR vendors github.com/moby/go-archive v0.2.0 → v0.2.1. The changes are all correctness improvements:

  • Whiteout guard fix: The PR moves the non-empty file check to before WriteHeader (old code wrote the header first, then returned an error — new code validates first). This is a genuine bug fix.
  • Hardlink tracking: SeenFiles[inode] now stores hdr.Name (the archive-relative name) instead of name (the raw on-disk path), which is more correct for archive consumers.
  • Modern Go idioms: strings.SplitSeq (Go 1.24+), maps.Copy, range-over-integer — all safe because docker/cli already requires Go 1.25.0.
  • Device number validation: Bounds-checks Devmajor/Devminor before unix.Mkdev to prevent silent integer truncation from crafted tar archives.
  • Error propagation: getInodeFromStat now returns an error on unexpected stat types instead of silently returning inode 0.
  • Nil-safety: Unpack now guards against nil TarOptions (previously could panic via CopyFileWithTar path).

No issues introduced by this PR. All hypotheses were investigated and dismissed — the changes are improvements, not regressions.

@thaJeztah
thaJeztah merged commit 9391c98 into docker:master Jul 24, 2026
104 checks passed
@thaJeztah
thaJeztah deleted the bump_go_archive_0.2.1 branch July 24, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants