From 719ef7fe54b449519d8cd78eade7ee9af51ae69a Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Fri, 13 Nov 2026 15:22:55 +0200 Subject: [PATCH] Revert "Fail the license header check when git merge-file errors" This reverts commit aaabaa1b35df5de428ad1a70b46263dfe71205c7. --- .../main/python/license-headers/check_license_headers.py | 2 +- .../python/license-headers/test_check_license_headers.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/src/main/python/license-headers/check_license_headers.py b/tools/src/main/python/license-headers/check_license_headers.py index 20d99d52dc..a01d776e43 100644 --- a/tools/src/main/python/license-headers/check_license_headers.py +++ b/tools/src/main/python/license-headers/check_license_headers.py @@ -231,7 +231,7 @@ def merged_ce_bases(repo, head, baseline): def merge_blobs(repo, ours, base, theirs): - result = run(["git", "merge-file", "-p", "--object-id", ours, base, theirs], repo, ok=range(0, 128)) + result = run(["git", "merge-file", "-p", "--object-id", ours, base, theirs], repo, ok=range(0, 256)) return result.stdout if result.returncode == 0 else None diff --git a/tools/src/main/python/license-headers/test_check_license_headers.py b/tools/src/main/python/license-headers/test_check_license_headers.py index 68f0526267..9989f5b2ec 100644 --- a/tools/src/main/python/license-headers/test_check_license_headers.py +++ b/tools/src/main/python/license-headers/test_check_license_headers.py @@ -663,14 +663,6 @@ class GitHistoryTests(unittest.TestCase): self.assertEqual(b"ONE\ntwo\nthree\nfour\nFIVE\n", p.merge_blobs(git.root, ours, base, theirs)) self.assertIsNone(p.merge_blobs(git.root, ours, base, blob("uno\ntwo\nthree\nfour\nfive\n"))) - def test_merge_blobs_fails_when_git_cannot_merge(self): - git = GitFixture(temporary_directory(self), "main") - git.write("File.java", "one\n") - git.commit("base") - blob = git("rev-parse", "HEAD:File.java") - with self.assertRaises(p.Failure): - p.merge_blobs(git.root, blob, blob, "no-such-object") - def test_ignore_filter_keeps_tracked_and_unignored_files(self): repo = temporary_directory(self) p.git(repo, "init")