Crate git_wrapper[][src]

A wrapper around git(1) inspired by GitPython.

Functions

clone

Clone a remote

config_set

Set a config value via git-config(1)

git_cmd

Helper function executing git without a working directory and returning std::process::Output.

git_cmd_out

Helper function executing git in the specified working directory and returning std::process::Output.

is_ancestor
is_sparse

Return true if the repository is sparse

is_working_dir_clean

Return true if the working dir index is clean.

ls_remote

Wrapper around git-ls-remote(1)

remote_ref_to_id

Resolve hash id of the given branch/tag at the remote.

resolve_head

Figure out the default branch for given remote.

rev_list
short_ref

Convert a long hash id to a short one.

sparse_checkout_add

Update the sparse-checkout file to include additional patterns.

subtree_add

Create the prefix subtree by importing its contents from the given remote and remote git_ref.

subtree_files

Return all .gitsubtrees files in the working directory.

tags_from_remote

Returns all tags from a remote

top_level

Return the path for the top level repository directory in current working dir.