Skip to content

Add support for Chmod on billy.Filesystem#171

Merged
pjbgf merged 1 commit intogo-git:releases/v5.xfrom
bitfehler:releases/v5.x
Dec 4, 2025
Merged

Add support for Chmod on billy.Filesystem#171
pjbgf merged 1 commit intogo-git:releases/v5.xfrom
bitfehler:releases/v5.x

Conversation

@bitfehler
Copy link
Contributor

The billy package contains a Change interface type, which seems to have gone unused for several years now, presumably due to the difficulty of implementing most of the required methods for all supported platforms.

This commit splits out a Chmod interface from it, which is supported on all platforms. The interface is implemented in all applicable abstractions.

Supporting chmod in billy would help with issues such as go-git/go-git#588

This is a backport of commit 601c531 on main (#157).

@bitfehler
Copy link
Contributor Author

@pjbgf as hinted at in #157, I'd love to see this backported 🙂

Differences to the version on main are the usage of os.FileMode instead of fs.FileMode (the library switched to the latter on main, but still uses os everywhere on this branch) and the potentially panicing cast in ChrootHelper.Chmod (because on this branch, that's what similar functions do, it was also just changed recently on main branch.

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Thanks for backporting this @bitfehler. Just a nit, otherwise LGTM:

The billy package contains a `Change` interface type, which seems to
have gone unused for several years now, presumably due to the difficulty
of implementing most of the required methods for all supported
platforms.

This commit splits out a `Chmod` interface from it, which is supported
on all platforms. The interface is implemented in all applicable
abstractions.

Supporting `chmod` in billy would help with issues such as
go-git/go-git#588

This is a backport of commit 601c531 on main (go-git#157).

Signed-off-by: Conrad Hoffmann <[email protected]>
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

@bitfehler thanks for working on this. 🙇

@pjbgf pjbgf merged commit 9263834 into go-git:releases/v5.x Dec 4, 2025
11 checks passed
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 24, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 24, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 24, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 24, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 25, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
pjbgf added a commit to pjbgf/go-billy that referenced this pull request Feb 25, 2026
This is a follow-up to go-git#171.

Signed-off-by: Paulo Gomes <[email protected]>
arthurzam pushed a commit to gentoo-golang-dist/forgejo-runner that referenced this pull request Feb 27, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) | `v5.6.2` -> `v5.8.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-git%2fgo-billy%2fv5/v5.8.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-git%2fgo-billy%2fv5/v5.6.2/v5.8.0?slim=true) |

---

### Release Notes

<details>
<summary>go-git/go-billy (github.com/go-git/go-billy/v5)</summary>

### [`v5.8.0`](https://github.com/go-git/go-billy/releases/tag/v5.8.0)

[Compare Source](go-git/go-billy@v5.7.0...v5.8.0)

#### What's Changed

- build: Update module golang.org/x/net to v0.45.0 \[SECURITY] (releases/v5.x) by [@&#8203;go-git-renovate](https://github.com/go-git-renovate)\[bot] in [#&#8203;183](go-git/go-billy#183)
- v5: Ensure Chmod behaviour across BoundOS and ChrootOS by [@&#8203;pjbgf](https://github.com/pjbgf) in [#&#8203;187](go-git/go-billy#187)

**Full Changelog**: <go-git/go-billy@v5.7.0...v5.8.0>

### [`v5.7.0`](https://github.com/go-git/go-billy/releases/tag/v5.7.0)

[Compare Source](go-git/go-billy@v5.6.2...v5.7.0)

#### What's Changed

- Add support for Chmod on billy.Filesystem by [@&#8203;bitfehler](https://github.com/bitfehler) in [#&#8203;171](go-git/go-billy#171)
- build: Update module golang.org/x/net to v0.38.0 \[SECURITY] (releases/v5.x) by [@&#8203;go-git-renovate](https://github.com/go-git-renovate)\[bot] in [#&#8203;177](go-git/go-billy#177)

**Full Changelog**: <go-git/go-billy@v5.6.2...v5.7.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjAiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIktpbmQvRGVwZW5kZW5jeVVwZGF0ZSIsInJ1bi1lbmQtdG8tZW5kLXRlc3RzIl19-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1409
Reviewed-by: Mathieu Fenniak <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
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