Introduction of the GitSetup
testhelper.MustRunCommand
includes in it two separate flows and needs to be divided into two. One should exec git operations only and rely on the configured git
executable. The other one should be used to run any other executable like du
, touch
, etc.
This change introduces GitSetup
struct that uses config.Cfg
as a base to run git
commands. It could be configured dynamically to use commit author, repository, etc.
This change is a just a demonstration of its usage and implementation will be extended with upcoming MRs.
The goal is to replace usage of testhelper.MustRunCommand
to run git
with a new GitSetup
and use MustRunCommand
for all other executables which do not require additional configuration.
Part of: #2699 (closed)