feat: add `git_fetch` repository rule
This patch also adds:
-
git_dir: create a.gitdeclared directory from a filegroup -
git_commit: represent agitcommit as a Bazel provider -
git_checkout: checkout a commit into a declared directory
These rules are stamped out in the git_fetch repository.
The network access is performed in the repository context to retrieve
the .git objects. The rest of the git operations are performed in
the action context. This has many benefits:
- On-demand I/O when actions are requested
- Separation of concerns for different
gitoperations - Remote cache and remote execution friendly actions
The rules use rules_coreutils and bazel/git> to be hermetic.
Edited by Matthew Clarkson