only include stuff we're interested in when applying the patch
diff --git a/backport.py b/backport.py index afe87d4..d2a276f 100644 --- a/backport.py +++ b/backport.py
@@ -72,7 +72,10 @@ target.write(patch) print(f'wrote {patch_path}') - call(f'git am -k --reject {patch_path}', cwd=mock_repo, shell=True) + call(f'git am -k ' + f'--include "mock/*" --include NEWS --include "NEWS.d/*" ' + f'--reject {patch_path} ', + cwd=mock_repo, shell=True) def update_last_sync(mock_repo, rev):