Module git

Module git 

Source

StructsΒ§

GitConfig

EnumsΒ§

PathFreshness
Represents the result of checking whether a set of paths have been modified locally or not.

ConstantsΒ§

LEGACY_BORS_EMAIL πŸ”’

FunctionsΒ§

check_path_modifications
This function figures out if a set of paths was last modified upstream or if there are some local modifications made to them. It can be used to figure out if we should download artifacts from CI or rather build them locally.
escape_email_git_regex πŸ”’
Escape characters from the git user e-mail, so that git commands do not interpret it as regex special characters.
get_closest_upstream_commit
Returns the most recent (ordered chronologically) commit found in the local history that should exist upstream. We identify upstream commits by the e-mail of the commit author.
get_git_modified_files
Returns the files that have been modified in the current branch compared to the master branch. This includes committed changes, uncommitted changes, and changes that are not even staged.
get_git_untracked_files
Returns the files that haven’t been added to git yet.
get_latest_upstream_commit_that_modified_files πŸ”’
Returns the latest upstream commit that modified target_paths, or None if no such commit was found.
has_changed_since
Returns true if any of the passed paths have changed since the base commit.
output_result
Runs a command and returns the output
resolve_commit_sha πŸ”’
Resolve the commit SHA of commit_ref.
run_git_diff_index πŸ”’
diff-index can return outdated information, because it does not update the git index. This function uses update-index to update the index first, and then provides func with a command prepared to run git diff-index.