From fc0056e8d5ab62adc17455c99864d9a974633a46 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Nov 2020 20:36:18 -0700 Subject: patman: Drop unicode helper functions We don't need these now that everything uses Python 3. Remove them and the extra code in GetBytes() and ToBytes() too. Signed-off-by: Simon Glass --- tools/patman/gitutil.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools/patman/gitutil.py') diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 31fb3b28299..6c4d2417a04 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -383,7 +383,6 @@ def BuildEmailList(in_list, tag=None, alias=None, raise_on_error=True): raw += LookupEmail(item, alias, raise_on_error=raise_on_error) result = [] for item in raw: - item = tools.FromUnicode(item) if not item in result: result.append(item) if tag: @@ -494,7 +493,7 @@ send --cc-cmd cc-fname" cover p1 p2' if smtp_server: cmd.append('--smtp-server=%s' % smtp_server) if in_reply_to: - cmd.append('--in-reply-to="%s"' % tools.FromUnicode(in_reply_to)) + cmd.append('--in-reply-to="%s"' % in_reply_to) if thread: cmd.append('--thread') -- cgit v1.2.3 From b3aff15ee4532332ea25aa7da7d40a916b8405b6 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Tue, 24 Nov 2020 18:14:52 +0100 Subject: patman: Add --no-signoff to suppress adding signoffs To enable use of patman with FSF/GNU projects, such as GCC or Binutils, no Signed-off-by may be added. This adds a command line flag '--no-signoff' to suppress adding signoffs in patman when processing commits. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass Fix patman testBranch() test: Signed-off-by: Simon Glass --- tools/patman/gitutil.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/patman/gitutil.py') diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 6c4d2417a04..bf1271ded72 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -305,7 +305,7 @@ def PruneWorktrees(git_dir): if result.return_code != 0: raise OSError('git worktree prune: %s' % result.stderr) -def CreatePatches(branch, start, count, ignore_binary, series): +def CreatePatches(branch, start, count, ignore_binary, series, signoff = True): """Create a series of patches from the top of the current branch. The patch files are written to the current directory using @@ -323,7 +323,9 @@ def CreatePatches(branch, start, count, ignore_binary, series): """ if series.get('version'): version = '%s ' % series['version'] - cmd = ['git', 'format-patch', '-M', '--signoff'] + cmd = ['git', 'format-patch', '-M' ] + if signoff: + cmd.append('--signoff') if ignore_binary: cmd.append('--no-binary') if series.get('cover'): -- cgit v1.2.3