diff options
author | Wu, Josh <Josh.wu@atmel.com> | 2015-04-15 10:25:18 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-23 12:35:50 -0600 |
commit | 3871cd858fcf8a00e31c2f456409afea03ce8788 (patch) | |
tree | 398180bc9a793ce8f91c52462c9c0c5cda1e1721 /tools/patman/gitutil.py | |
parent | 1246231c488b5f980830384e83d39a839043082b (diff) | |
download | u-boot-3871cd858fcf8a00e31c2f456409afea03ce8788.zip u-boot-3871cd858fcf8a00e31c2f456409afea03ce8788.tar.gz u-boot-3871cd858fcf8a00e31c2f456409afea03ce8788.tar.bz2 |
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/gitutil.py')
-rw-r--r-- | tools/patman/gitutil.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 4c2c35b..9e739d8 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -545,6 +545,17 @@ def GetDefaultUserEmail(): uemail = command.OutputOneLine('git', 'config', '--global', 'user.email') return uemail +def GetDefaultSubjectPrefix(): + """Gets the format.subjectprefix from local .git/config file. + + Returns: + Subject prefix found in local .git/config file, or None if none + """ + sub_prefix = command.OutputOneLine('git', 'config', 'format.subjectprefix', + raise_on_error=False) + + return sub_prefix + def Setup(): """Set up git utils, by reading the alias files.""" # Check for a git alias file also |