Expand description
Tools for interfacing with the Git repository.
Structs§
- Branch
- Represents a Git branch.
- Cherry
Pick Fast Options - Options for
Repo::cherry_pick_fast
. - Commit
- Represents a commit object in the Git object database.
- Config
- Wrapper around the config values stored on disk for Git.
- Config
Value - A wrapper around a possible value that can be set for a config key.
- Diff
- A diff between two trees/commits.
- GitRun
Info - Path to the
git
executable on disk to be executed. - GitRun
Opts - Options for invoking Git.
- GitRun
Result - The result of invoking Git.
- GitVersion
- The parsed version of Git.
- Index
- The Git index.
- Index
Entry - An entry in the Git index.
- NonZero
Oid - Represents the ID of a Git object.
- PatchId
- A checksum of the diff induced by a given commit, used for duplicate commit detection.
- Reference
- Represents a reference to an object.
- Reference
Name - The name of a reference, like
refs/heads/master
. - Repo
- Wrapper around
git2::Repository
. - Resolved
Reference Info - A snapshot of information about a certain reference. Updates to the reference after this value is obtained are not reflected.
- Serialized
NonZero Oid - A version of
NonZeroOid
that can be serialized and deserialized. - Serialized
Test Result - Status
Entry - The status of a file in the repo.
- Time
- A timestamp as used in a
git2::Signature
. - Tree
- A tree object. Contains a mapping from name to OID.
- Working
Copy Snapshot - A special
Commit
which represents the status of the working copy at a given point in time. This means that it can include changes in any stage.
Enums§
- Amend
Fast Options - Options for
Repo::amend_fast
- Categorized
Reference Name - Determine what kind of branch a reference is, given its name.
- Create
Commit Fast Error - An error raised when attempting to create create a commit via
Repo::cherry_pick_fast
. - File
Mode - Wrapper around git2::FileMode.
- File
Status - A Git file status indicator. See https://git-scm.com/docs/git-status#_short_format.
- GitError
Code - An enumeration of possible errors that can happen when working with a git repository.
- Maybe
Zero Oid - OID which may be zero or non-zero.
- Reference
Target - The target of a reference.
- Repo
Error - Stage
- The possible stages for items in the index.
- Test
Command - A test command to run.
- Update
Index Command - The command to update the index, as defined by
git update-index
. - Working
Copy Changes Type - The type of changes in the working copy, if any.
Constants§
- TEST_
ABORT_ EXIT_ CODE - The exit status used to abort a process.
- TEST_
INDETERMINATE_ EXIT_ CODE - The exit status to use when a test command intends to skip the provided commit.
- TEST_
SUCCESS_ EXIT_ CODE - The exit status to use when a test command succeeds.
Traits§
- Config
Read - Read-only interface to Git’s configuration.
- Config
Write - Write-only interface to Git’s configuration.
Functions§
- dehydrate_
tree - Filter the entries in the provided tree by only keeping the provided paths.
- get_
changed_ paths_ between_ trees - Get the paths which are different between two tree objects. This is faster
than the
git2
implementation, which always iterates all tree entries in all tree objects recursively. - get_
latest_ test_ command_ path - Get the path to the file where the latest test command is stored.
- get_
test_ locks_ dir - Get the directory where the locks for running tests are stored.
- get_
test_ tree_ dir - Get the directory where the result of tests for a particular commit are stored.
- get_
test_ worktrees_ dir - Get the directory where the worktrees for running tests are stored.
- hydrate_
tree - Add the provided entries into the tree.
- make_
test_ command_ slug - Convert a command string into a string that’s safe to use as a filename.
- message_
prettify - Clean up a message, removing extraneous whitespace plus comment lines starting with
comment_char
, and ensure that the message ends with a newline. - process_
diff_ for_ record - Calculate the diff between the index and the working copy.
- update_
index - Update the index. This handles updates to stages other than 0.
Type Aliases§
- Branch
Type - Re-export of
git2::BranchType
. This might change to be an opaque type later. - Repo
Result - Result type.