Skip to content

Commit c474cce

Browse files
committed
extract_utils: use apply instead of am
Fixes applying diffs without git metadata. Change-Id: I3f55e5819790d0f4620ef5614afd49d20b817f32
1 parent ab04367 commit c474cce

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

extract_utils/fixups_blob.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ def git_add_files(files: List[str]):
286286

287287
for patch in patches:
288288
try:
289-
run_cmd(['git', 'am', '--reject', patch])
289+
run_cmd(['git', 'apply', '--reject', patch])
290+
patch_files = self.__get_patch_affected_files(patch)
291+
git_add_files(patch_files)
292+
run_cmd(['git', 'commit', '-m', f'Apply: "{patch}"'])
290293
except ValueError as e:
291294
color_print(
292295
f'Failed to apply patch {patch}',

0 commit comments

Comments
 (0)