3.1.38.6. waf_tools.vcs_git.get_master_commit_distance
- waf_tools.vcs_git.get_master_commit_distance(repo: Repo, version: VcsInformation) int
Compute how many commits the current commit is ahead of ‘master’.
- Parameters:
repo – The repository used for running the revision query.
version – The version container providing the short hash and a fallback value.
- Returns:
The number of commits reachable from the current commit but not from ‘master’. If the command fails or the result cannot be parsed, returns the existing value from the version container.