Change the behavior of the git fetcher so that it doesn't apply the checkout operation again, when the repository root folder is changed manually by the user.
The git.py file has been modified. Сhanges were made to the gen_fetch function.
Previous dependency chain was:
git_clone rule generates repository folder as an $out parameter
git_checkout usage depends on the same repository folder
With it the change of the folder by the user leads to a side-effect, as git_checkout_stamp file marker becomes 'dirty'.
This patch changes the dependency chain to:
git_clone rule generates repository folder AND a git_clone_stamp file marker as an $out parameter. 2 output artifacts
git_checkout usage depends on the git_clone_stamp file marker
With this approach change of the folder by the user does not affect the state of the artifact generated by the git_checkout rule.
Still, if the repository folder would be deleted, it will cause application of both git_clone and git_checkout operations.
With this patch, when the root directory of any git-fetcher related project is manually updated, the build system will not jump back to the branch, defined in the YAML file.
Change the behavior of the git fetcher so that it doesn't apply the checkout operation again, when the repository root folder is changed manually by the user.
The git.py file has been modified. Сhanges were made to the gen_fetch function.
Previous dependency chain was:
With it the change of the folder by the user leads to a side-effect, as git_checkout_stamp file marker becomes 'dirty'.
This patch changes the dependency chain to:
With this approach change of the folder by the user does not affect the state of the artifact generated by the git_checkout rule.
Still, if the repository folder would be deleted, it will cause application of both git_clone and git_checkout operations.
With this patch, when the root directory of any git-fetcher related project is manually updated, the build system will not jump back to the branch, defined in the YAML file.