Expand description
sync git api
Re-exports§
pub use blame::blame_file;
pub use blame::BlameHunk;
pub use blame::FileBlame;
pub use branch::branch_compare_upstream;
pub use branch::checkout_branch;
pub use branch::checkout_commit;
pub use branch::config_is_pull_rebase;
pub use branch::create_branch;
pub use branch::delete_branch;
pub use branch::get_branch_remote;
pub use branch::get_branches_info;
pub use branch::merge_commit::merge_upstream_commit;
pub use branch::merge_ff::branch_merge_upstream_fastforward;
pub use branch::merge_rebase::merge_upstream_rebase;
pub use branch::rename::rename_branch;
pub use branch::validate_branch_name;
pub use branch::BranchCompare;
pub use branch::BranchDetails;
pub use branch::BranchInfo;
pub use commit::amend;
pub use commit::commit;
pub use commit::tag_commit;
pub use commit_files::get_commit_files;
pub use diff::get_diff_commit;
pub use remotes::get_default_remote;
pub use remotes::get_default_remote_for_fetch;
pub use remotes::get_default_remote_for_push;
pub use remotes::get_remotes;
pub use status::is_workdir_clean;
pub use utils::get_head;
pub use utils::get_head_tuple;
pub use utils::repo_dir;
pub use utils::repo_open_error;
pub use utils::stage_add_all;
pub use utils::stage_add_file;
pub use utils::stage_addremoved;
pub use utils::Head;
Modules§
- blame
- Sync git API for fetching a file blame
- branch
- branch functions
- commit
- Git Api for Commits
- commit_
files - Functions for getting infos about files in commits
- cred
- credentials git helper
- diff
- sync git api for fetching a diff
- remotes
- sign
- Sign commit data.
- status
- sync git api for fetching a status
- utils
- sync git api (various methods)
Structs§
- Commit
Details - Commit
Id - identifies a single commit
- Commit
Info - Commit
Message - Commit
Signature - LogFilter
Search - LogFilter
Search Options - LogWalker
- Search
Fields - Search
Options - Submodule
Info - Submodule
Parent Info - Submodule
Status - Return codes for submodule status.
- Tag
- TagWith
Metadata - Tree
File tree_files
returns a list ofFileTree
Enums§
- Branch
Type - An enumeration for the possible types of branches
- Hook
Result - Prepare
Commit MsgSource - Push
Tags Progress - Repo
Path - Repo
State - Reset
Type - An enumeration of the operations that can be performed for the
reset
method on aRepository
. - Show
Untracked Files Config - represents the
status.showUntrackedFiles
git config state
Traits§
Functions§
- abort_
pending_ rebase - abort_
pending_ state - does these steps:
- add_
to_ ignore - add file or path to root ignore file
- commit_
revert - continue_
pending_ rebase - delete_
tag - diff_
contains_ file - discard_
lines - discards specific lines in an unstaged hunk of a diff
- filter_
commit_ by_ search - get_
commit_ details - get_
commit_ info - get_
commits_ info - get_
config_ string - get string from config
- get_
stashes - get_
submodules - get_
tags - returns
Tags
type filled with all tags found in repo - get_
tags_ with_ metadata - hooks_
commit_ msg - this hook is documented here https://git-scm.com/docs/githooks#_commit_msg
we use the same convention as other git clients to create a temp
file containing the commit message at
<.git|hooksPath>/COMMIT_EDITMSG
and pass it’s relative path as the only parameter to the hook script. - hooks_
post_ commit - hooks_
pre_ commit - this hook is documented here https://git-scm.com/docs/githooks#_pre_commit
- hooks_
prepare_ commit_ msg - merge_
branch - merge_
commit - merge_
msg - mergehead_
ids - rebase_
branch - rebase current HEAD on
branch
- rebase_
progress - repo_
state - reset_
hunk - this will fail for an all untracked file
- reset_
repo - reset_
stage - reset_
workdir - revert_
commit - revert_
head - reword
- This is the same as reword, but will abort and fix the repo if something goes wrong
- stage_
hunk - stage_
lines - stash_
apply - stash_
drop - stash_
pop - stash_
save - submodule_
parent_ info - query whether
repo_path
points to a repo that is part of a parent git which contains it as a submodule - tree_
file_ content - will only work on utf8 content
- tree_
files - guarantees sorting the result
- unstage_
hunk - untracked_
files_ config - update_
submodule
Type Aliases§
- Commit
Tags - all tags pointing to a single commit
- Repo
Path Ref - Shared
Commit Filter Fn - Tags
- hashmap of tag target commit hash to tag names