summaryrefslogtreecommitdiff
path: root/tools/patman/series.py
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2015-04-15 10:25:18 +0800
committerSimon Glass <sjg@chromium.org>2015-04-23 12:35:50 -0600
commit3871cd858fcf8a00e31c2f456409afea03ce8788 (patch)
tree398180bc9a793ce8f91c52462c9c0c5cda1e1721 /tools/patman/series.py
parent1246231c488b5f980830384e83d39a839043082b (diff)
patman: check git format.subjectprefix setting when generate patches prefix
For the local project, we may specified format.subjectprefix setting. Then the patch will be formated as [Project_prefix][PATCH]. But patman will not check this setting. It will remove the format.subjectprefix. So This patch will let patman check this setting and add it as a project prefix. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r--tools/patman/series.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 60ebc766f7..a17a7d1de7 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -254,6 +254,12 @@ class Series(dict):
Return:
Patch string, like 'RFC PATCH v5' or just 'PATCH'
"""
+ git_prefix = gitutil.GetDefaultSubjectPrefix()
+ if git_prefix:
+ git_prefix = '%s][' % git_prefix
+ else:
+ git_prefix = ''
+
version = ''
if self.get('version'):
version = ' v%s' % self['version']
@@ -262,4 +268,4 @@ class Series(dict):
prefix = ''
if self.get('prefix'):
prefix = '%s ' % self['prefix']
- return '%sPATCH%s' % (prefix, version)
+ return '%s%sPATCH%s' % (git_prefix, prefix, version)