Skip to content

v6: Ensure Chmod behaviour across BoundOS and ChrootOS#188

Merged
pjbgf merged 5 commits intogo-git:mainfrom
pjbgf:forward
Feb 26, 2026
Merged

v6: Ensure Chmod behaviour across BoundOS and ChrootOS#188
pjbgf merged 5 commits intogo-git:mainfrom
pjbgf:forward

Conversation

@pjbgf
Copy link
Member

@pjbgf pjbgf commented Feb 25, 2026

Forward-port for #187.

Copilot AI review requested due to automatic review settings February 25, 2026 16:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR forward-ports fixes from v5 (PR #187) to v6, ensuring consistent Chmod behavior across BoundOS and ChrootOS filesystem implementations, and fixing TempFile to automatically create directories when they don't exist.

Changes:

  • Modified BoundOS.TempFile to automatically create the target directory if it doesn't exist, rather than failing
  • Added test coverage for the polyfill's Chmod support to verify it properly returns ErrNotSupported when the underlying filesystem doesn't support it
  • Updated CI workflows to use "oldstable" and "stable" Go version aliases instead of hardcoded version numbers

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
osfs/os_bound.go Added directory creation logic in TempFile when directory doesn't exist
osfs/os_bound_test.go Updated TempFile tests to expect success instead of errors when directories don't exist
helper/polyfill/polyfill_test.go Added TestChmod to verify polyfill properly handles Chmod when unsupported
.github/workflows/test.yml Changed go-version from hardcoded values to "oldstable" and "stable" aliases
.github/workflows/test_wasip1.yml Changed go-version from hardcoded values to "oldstable" and "stable" aliases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Previously if the dir didn't already exist an error would be returned,
which meant that some go-git features would break when changing ChrootOS
with BoundOS.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
x-ref: go-git/go-git#1769

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@pjbgf pjbgf force-pushed the forward branch 2 times, most recently from 1d5f46b to f76e254 Compare February 25, 2026 23:54
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@pjbgf pjbgf merged commit 64172ab into go-git:main Feb 26, 2026
11 checks passed
@pjbgf pjbgf deleted the forward branch February 26, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants