build_helper

Module git

source

Structs§

Functions§

  • Searches for the nearest merge commit in the repository that also exists upstream.
  • Returns the files that have been modified in the current branch compared to the master branch. The extensions parameter can be used to filter the files by their extension. Does not include removed files. If extensions is empty, all files will be returned.
  • Returns the files that haven’t been added to git yet.
  • Finds the remote for rust-lang/rust. For example for these remotes it will return upstream.
  • Finds the nearest merge commit by comparing the local HEAD with the upstream branch’s state. To work correctly, the upstream remote must be properly configured using git remote add <name> <url>. In most cases get_closest_merge_commit is the function you are looking for as it doesn’t require remote to be configured.
  • Runs a command and returns the output
  • Returns the master branch from which we can take diffs to see changes. This will usually be rust-lang/rust master, but sometimes this might not exist. This could be because the user is updating their forked master branch using the GitHub UI and therefore doesn’t need an upstream master branch checked out. We will then fall back to origin/master in the hope that at least this exists.