Skip to content
Verified Commit 593a8e7b authored by Matthew Clarkson's avatar Matthew Clarkson
Browse files

feat: add `git_fetch` repository rule

This patch also adds:

- `git_dir`: create a `.git` declared directory from a filegroup
- `git_commit`: represent a `git` commit 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 `git` operations
- Remote cache and remote execution friendly actions

The actions use `rules_coreutils` to be hermetic.

_Currently_, the `git` CLI is used from the local machine to prove
out the operation and determine the needed functionality from the CLI.
A project is being brought up at bazel/git> to implement a hermetic
CLI implementation that provides _just enough_ to make this ruleset
hermetic.
parent 88a8fc26
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment