Module git_util

Source
Expand description

Contains helpers for wrangling git2.

A good source of ideas for how we should be interacting with Git is contained in Cargo’s git/utils.rs: https://github.com/rust-lang/cargo/blob/master/src/cargo/sources/git/utils.rs

Functions§

clone
commit_and_push
init_test_repo
We want to use a mock repo in tests but we don’t want have to manually initialise it or manage commiting new files. This method will ensure the test repo is a valid git repo with all files commited to the main branch. Typically test-registries/primary-registry/index.
open_or_clone
update_index