diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2020-05-04 00:52:44 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-05-29 20:55:45 -0600 |
commit | 14aa35ad551b3d35a5c7ba8871eb67bd05f1f9b0 (patch) | |
tree | 5fe89636262e3830b7f3bc927e651c996093570d /tools/patman/gitutil.py | |
parent | 0fc01bf826036698a8d0eb8405e832a6a759472e (diff) |
patman: Add an option to create patches without binary contents
Some mailing lists have size limits and when we add binary contents
to our patches it's easy to exceed the size limits.
Git supports a command line option "--no-binary" to generate patches
without any binary contents. Add an option in patman to handle this.
Note with this option patches cannot be applied properly, but they
are still useful for code review.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/gitutil.py')
-rw-r--r-- | tools/patman/gitutil.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 770a051014..72fc95d558 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -254,7 +254,7 @@ def Fetch(git_dir=None, work_tree=None): if result.return_code != 0: raise OSError('git fetch: %s' % result.stderr) -def CreatePatches(start, count, series): +def CreatePatches(start, count, ignore_binary, series): """Create a series of patches from the top of the current branch. The patch files are written to the current directory using @@ -270,6 +270,8 @@ def CreatePatches(start, count, series): if series.get('version'): version = '%s ' % series['version'] cmd = ['git', 'format-patch', '-M', '--signoff'] + if ignore_binary: + cmd.append('--no-binary') if series.get('cover'): cmd.append('--cover-letter') prefix = series.GetPatchPrefix() |