Expand description
Git Operations for Nargo.
This crate provides git operations using native Rust git implementations. It supports basic Git operations such as clone, init, commit, push, pull, and status query.
Structs§
- GitCommit
- Represents a git commit with its metadata.
- GitDiff
File - Represents a git diff for a file.
- GitDiff
Hunk - Represents a git diff hunk.
Functions§
- add_
remote - Adds a new remote repository.
- clone
- Clones a git repository from a remote URL to a local directory.
- commit_
all - Commits all changes in the git repository at the specified path.
- create_
branch - Creates a new git branch.
- create_
tag - Creates a new git tag.
- delete_
branch - Deletes a specified git branch.
- delete_
tag - Deletes a specified git tag.
- get_
current_ branch - Gets the current branch name of the git repository at the specified path.
- get_
diff_ commit_ to_ workdir - Gets the git diff between a commit and the working directory.
- get_
diff_ commits - Gets the git diff between two commits.
- get_
diff_ index - Gets the git diff between the working directory and the index (staged changes).
- get_
file_ log - Gets the git log for a specific file.
- get_log
- Gets the git commit history (log) for the repository at the specified path.
- get_
status - Gets the git status of the repository at the specified path.
- init
- Initializes a new git repository at the specified path.
- list_
branches - Lists all branches in the git repository.
- list_
remotes - Lists all remote repositories.
- list_
stashes - Lists all stashes in the git repository.
- list_
tags - Lists all tags in the git repository.
- merge_
branch - Merges a specified git branch into the current branch.
- pull
- Pulls changes from a remote repository.
- push
- Pushes changes to a remote repository.
- push_
tag - Pushes a git tag to a remote repository.
- remove_
remote - Removes a remote repository.
- rename_
remote - Renames a remote repository.
- stash
- Stashes current changes in the git repository.
- stash_
apply - Applies the most recent stash without removing it from the stash list.
- stash_
pop - Applies the most recent stash and removes it from the stash list.
- switch_
branch - Switches to a specified git branch.