git: ensure exec option is propagated to child git clis
Alternative to #5092, fixes #5066.
This option is already correctly specified in gitCLI, the call chain looks like:
gitutil.NewCLI(..., gitutil.WithExec(runWithStandardUmask))called ingitCLIgitCLIcalled inmountRemotegit.Newcalled inmountRemote
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.
We should make sure test coverage catches this case now.
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:
I've seen this, just haven't had a moment to write the test - will look at this as soon as I can.
Pushed a test update