Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Chadwell's umask fix #745

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV BUILDKIT_VERSION 0.14.1

COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
git-no-submodules.patch \
mips64le.patch \
Expand Down
1 change: 1 addition & 0 deletions buildkit/Dockerfile.0.13
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV BUILDKIT_VERSION 0.13.2

COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
git-no-submodules.patch \
mips64le.patch \
Expand Down
1 change: 1 addition & 0 deletions buildkit/Dockerfile.rc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV BUILDKIT_VERSION 0.14.0-rc2

COPY \
backport-5072-fetch-tags.patch \
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
git-no-submodules.patch \
mips64le.patch \
Expand Down
1 change: 1 addition & 0 deletions buildkit/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ COPY \
{{ if env.variant != "dev" and (.version | startswith("0.13.") or startswith("0.14.")) then ( -}}
backport-5072-fetch-tags.patch \
{{ ) else "" end -}}
backport-5096-fix-umask.patch \
containerd-arm64-v8.patch \
git-no-submodules.patch \
mips64le.patch \
Expand Down
34 changes: 34 additions & 0 deletions buildkit/backport-5096-fix-umask.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Description: git: ensure exec option is propagated to child git clis
Author: Justin Chadwell <me@jedevc.com>
Forwarded: https://github.com/moby/buildkit/pull/5096

diff --git a/util/gitutil/git_cli.go b/util/gitutil/git_cli.go
index 61187184bad9..5c35f9365b73 100644
--- a/util/gitutil/git_cli.go
+++ b/util/gitutil/git_cli.go
@@ -119,20 +119,13 @@ func NewGitCLI(opts ...Option) *GitCLI {
// New returns a new git client with the same config as the current one, but
// with the given options applied on top.
func (cli *GitCLI) New(opts ...Option) *GitCLI {
- c := &GitCLI{
- git: cli.git,
- dir: cli.dir,
- workTree: cli.workTree,
- gitDir: cli.gitDir,
- args: append([]string{}, cli.args...),
- streams: cli.streams,
- sshAuthSock: cli.sshAuthSock,
- sshKnownHosts: cli.sshKnownHosts,
- }
+ clone := *cli
+ clone.args = append([]string{}, cli.args...)
+
for _, opt := range opts {
- opt(c)
+ opt(&clone)
}
- return c
+ return &clone
}

// Run executes a git command with the given args.
Loading