]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
git-filter: We no longer need to check for non pdns/ paths
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 3 Oct 2023 14:26:30 +0000 (16:26 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Oct 2023 08:35:23 +0000 (10:35 +0200)
.github/scripts/git-filter.py

index d776cc550222a1d25917c5701f4eef1783632512..aa05904f0a5e6de7638081f7c63d0df966feb9ac 100755 (executable)
@@ -32,25 +32,6 @@ def main():
     for patch in patch_set:
         path = os.path.join(root, patch.path)
         if path in compdb:
-            if not patch.path.startswith(pdns_path):
-                # If the file being diffed is not under the pdns/ directory, we
-                # need to reconstruct its filename in the patch adding extra
-                # paths that clang-tidy-diff will get rid of: this way
-                # clang-tidy can work with the correct file path.
-                #
-                # Example with a source file under modules/:
-                #   patch.path = modules/foo/foo.cc
-                #   path       = /home/user/workspace/pdns/modules/foo/foo.cc
-                #   cwd        = /home/user/workspace/pdns/pdns/
-                #   relpath    = ../modules/foo/foo.cc
-                #
-                # Then the patch filenames would be:
-                #   patch.source_file = a/pdns/../modules/foo/foo.cc
-                #   patch.target_file = b/pdns/../modules/foo/foo.cc
-                relpath = os.path.relpath(path, cwd)
-                if patch.source_file is not None:
-                    patch.source_file = os.path.join("a", "pdns", relpath)
-                patch.target_file = os.path.join("b", "pdns", relpath)
             print(patch)
         else:
             msg = f"Skipping {path}: it is not in the compilation db"