[recipes] Rename patch function to apply_patchfile

Change-Id: I611b7b65306f5e395b132aec6059ae2856c2be0f
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1011957
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Danielle Kay <danikay@google.com>
diff --git a/recipe_modules/git/api.py b/recipe_modules/git/api.py
index ef37255..2a35fcd 100644
--- a/recipe_modules/git/api.py
+++ b/recipe_modules/git/api.py
@@ -78,7 +78,7 @@
                         if self.m.path.isfile(log):
                             self.m.file.read_text(self.m.path.basename(log), log)
 
-    def apply(self, patch, **kwargs):
+    def apply_patchfile(self, patch, **kwargs):
         """Apply the specified git patch file.
 
         Args:
diff --git a/recipe_modules/git/tests/full.py b/recipe_modules/git/tests/full.py
index ad0a517..c5d4ab2 100644
--- a/recipe_modules/git/tests/full.py
+++ b/recipe_modules/git/tests/full.py
@@ -221,7 +221,7 @@
         api.git.log(fmt="%H")
 
         # Apply a patch.
-        api.git.apply(patch=patch_file)
+        api.git.apply_patchfile(patch=patch_file)
 
         api.git.upload_cl(
             labels={
diff --git a/recipes/contrib/clang_toolchain.py b/recipes/contrib/clang_toolchain.py
index e44d89f..33c5c8a 100644
--- a/recipes/contrib/clang_toolchain.py
+++ b/recipes/contrib/clang_toolchain.py
@@ -1665,7 +1665,7 @@
     # the Makefile to set up a relative dylib search.
     if api.platform.is_mac:
         with api.context(cwd=src_dir):
-            api.git.apply(api.resource("cpython-darwin.patch"))
+            api.git.apply_patchfile(api.resource("cpython-darwin.patch"))
 
     build_dir = base_dir.join("build")
     api.file.ensure_directory("make build dir", build_dir)
diff --git a/recipes/contrib/edk2.py b/recipes/contrib/edk2.py
index c7ad0cb..660b699 100644
--- a/recipes/contrib/edk2.py
+++ b/recipes/contrib/edk2.py
@@ -95,12 +95,12 @@
 
     # TODO(joshuaseaton): Report or fix bugs upstream where possible.
     with api.context(cwd=checkout_dir):
-        api.git.apply(api.resource("ld-notext.patch"))
-        api.git.apply(api.resource("no-maybe-uninitialized.patch"))
+        api.git.apply_patchfile(api.resource("ld-notext.patch"))
+        api.git.apply_patchfile(api.resource("no-maybe-uninitialized.patch"))
 
         # NOTE: Ideally we would use the GCCNOLTO toolchain, but there is
         # no RISCV64 version of that yet.
-        api.git.apply(api.resource("no-lto.patch"))
+        api.git.apply_patchfile(api.resource("no-lto.patch"))
 
     cipd_dir = api.path["start_dir"].join("cipd")
     with api.step.nest("ensure packages"):