aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-09-22 10:20:11 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-09-22 10:20:11 -0400
commit7eba05fd4531008bf4c453a9f73b31dee213d6ef (patch)
treeac33b708bd3eed9585853ae4a60669266b8468e4
parent6592719c28f975643071b6e47cf0c333befb2c19 (diff)
downloadb4-7eba05fd4531008bf4c453a9f73b31dee213d6ef.tar.gz
ez: generate patch with diffstat
When generating patches from commit range, add a diffstat for a fuller compatibility with the default git-format-patch behaviour. Reported-by: Guillaume Ranquet <granquet@baylibre.com> Link: https://msgid.link/CABnWg9uBOGqJMq=yCtn7SoEME=+2u1-ZK9ftb6=_jRhkhL_jiw@mail.gmail.com Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 08edf65..53412ec 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2689,7 +2689,8 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
if commit in ignore_commits:
logger.debug('Ignoring commit %s', commit)
continue
- ecode, out = git_run_command(gitdir, ['show', '--format=email', '--encoding=utf-8', commit], decode=False)
+ ecode, out = git_run_command(gitdir, ['show', '--format=email', '--patch-with-stat', '--encoding=utf-8',
+ commit], decode=False)
if ecode > 0:
raise RuntimeError(f'Could not get a patch out of {commit}')
msg = email.message_from_bytes(out)