diff options
author | Abhishek Arya <inferno@chromium.org> | 2021-01-27 17:43:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 17:43:15 -0800 |
commit | d45336243a6bd06b954c475b8ab40f76fced0feb (patch) | |
tree | f37254dd602ba26e4cd51bd97906774c7ba3650e /infra/ci/build.py | |
parent | aeb1be4b6ef51bdc9dc0b42c67b4aba055ea89b6 (diff) | |
download | oss-fuzz-d45336243a6bd06b954c475b8ab40f76fced0feb.tar.gz |
Simplify changed files logic. (#5056)
Diffstat (limited to 'infra/ci/build.py')
-rwxr-xr-x | infra/ci/build.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/infra/ci/build.py b/infra/ci/build.py index 9a1ed6231..f71799bb2 100755 --- a/infra/ci/build.py +++ b/infra/ci/build.py @@ -37,10 +37,8 @@ LANGUAGES_WITH_COVERAGE_SUPPORT = ['c', 'c++', 'go'] def get_changed_files_output(): """Returns the output of a git command that discovers changed files.""" - main_branch = subprocess.check_output( - ['git', 'rev-parse', '--abbrev-ref', 'origin/HEAD']).strip().decode() branch_commit_hash = subprocess.check_output( - ['git', 'merge-base', 'FETCH_HEAD', main_branch]).strip().decode() + ['git', 'merge-base', 'FETCH_HEAD', 'origin/HEAD']).strip().decode() return subprocess.check_output( ['git', 'diff', '--name-only', branch_commit_hash + '..']).decode() |