# Module cargo::sources::git

source ·

## Modules

- fetch
- known_hosts 🔒
  SSH host key validation support.
- oxide 🔒
  This module contains all code sporting `gitoxide` for operations on `git` repositories and it mirrors `utils` closely for now. One day it can be renamed into `utils` once `git2` isn’t required anymore.
- source 🔒
- utils 🔒
  Utilities for handling git repositories, mainly around authentication/cloning.

## Structs

- GitCheckout
  `GitCheckout` is a local checkout of a particular revision. Calling `clone_into` with a reference will resolve the reference into a revision, and return an `anyhow::Error` if no revision for that reference was found.
- GitDatabase
  `GitDatabase` is a local clone of a remote repository’s database. Multiple `GitCheckouts` can be cloned from this `GitDatabase`.
- GitRemote
  `GitRemote` represents a remote repository. It gets cloned into a local `GitDatabase`.
- GitSource

## Functions

- fetch
  Note that `history` is a complex computed value to determine whether it’s acceptable to perform shallow clones at all. It’s needed to allow the caller to determine the correct position of the destination repository or move it into place should its position change.