Skip to main content

Crate nargo_git

Crate nargo_git 

Source
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.
GitDiffFile
Represents a git diff for a file.
GitDiffHunk
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.