moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
7.83k stars 1.09k forks source link

git: ensure exec option is propagated to child git clis #5096

Open jedevc opened 4 days ago

jedevc commented 4 days ago

Alternative to #5092, fixes #5066.

This option is already correctly specified in gitCLI, the call chain looks like:

The exec field specified by WithExec from the first NewCLI call should propagate down to git.New - but this wasn't being done, I clearly missed this somehow.

tonistiigi commented 4 days ago

We should make sure test coverage catches this case now.

tianon commented 4 days ago

FWIW, I have now also tested this change and verified it fixes the bug (for completeness, not because I didn't believe it would) :heart:

Happy to see someone who's familiar with this codebase working on it instead of me! :joy: :heart: