aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-06-19 12:31:58 +0530
committerGitHub <noreply@github.com>2024-06-19 07:01:58 +0000
commit48035141966c907ee7cdd0cd73d55da0d3f866a0 (patch)
tree7eca30c43802881c4e800b08caaf88c85eff1ed5
parent24906e1c21b69af0d70091c5541cdf133f2591ea (diff)
downloadservo-48035141966c907ee7cdd0cd73d55da0d3f866a0.tar.gz
servo-48035141966c907ee7cdd0cd73d55da0d3f866a0.zip
mach: fix test-tidy to handle missing merge commit (#32551)
This restores the behaviour prior to #32540 where the case where no merge commit being found (which happens on CI in forks because we do a shallow clone) is handled as if no changes where found. Fixes #32550. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
-rw-r--r--python/tidy/tidy.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py
index 21179885148..b57a127c102 100644
--- a/python/tidy/tidy.py
+++ b/python/tidy/tidy.py
@@ -159,6 +159,8 @@ class FileList(object):
def _git_changed_files(self):
file_list = git_changes_since_last_merge(self.directory)
+ if not file_list:
+ return
for f in file_list:
if not any(os.path.join('.', os.path.dirname(f)).startswith(path) for path in self.excluded):
yield os.path.join('.', f)