buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

git: ensure exec option is propagated to child git clis

Open jedevc opened this issue 1 year ago • 2 comments

Alternative to #5092, fixes #5066.

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

  • gitutil.NewCLI(..., gitutil.WithExec(runWithStandardUmask)) called in gitCLI
  • gitCLI called in mountRemote
  • git.New called in mountRemote

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.

jedevc avatar Jun 27 '24 11:06 jedevc

We should make sure test coverage catches this case now.

tonistiigi avatar Jun 27 '24 14:06 tonistiigi

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:

tianon avatar Jun 27 '24 16:06 tianon

I've seen this, just haven't had a moment to write the test - will look at this as soon as I can.

jedevc avatar Jul 02 '24 15:07 jedevc

Pushed a test update

tonistiigi avatar Jul 03 '24 05:07 tonistiigi