summaryrefslogtreecommitdiff
path: root/tools/patman/gitutil.py
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2013-04-15 23:52:18 +0000
committerTom Rini <trini@ti.com>2013-04-18 16:16:32 -0400
commit2386060c16471f4cd183e6f8bce82450a7574ec6 (patch)
tree7d4ecbe7ac37887f20480ac2cc6511fe5849fe34 /tools/patman/gitutil.py
parent17dcbfb0876385b13739b1b1f2026edc8163b629 (diff)
downloadu-boot-imx-2386060c16471f4cd183e6f8bce82450a7574ec6.zip
u-boot-imx-2386060c16471f4cd183e6f8bce82450a7574ec6.tar.gz
u-boot-imx-2386060c16471f4cd183e6f8bce82450a7574ec6.tar.bz2
patman: fix gitutil for decorations
The git config parameter log.decorate is quite useful when working with git. Patman, however can not handle the decorated output when parsing the commit. To prevent this use the '--no-decorate' switch for git-log. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/gitutil.py')
-rw-r--r--tools/patman/gitutil.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index f485750..e31da15 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -39,7 +39,8 @@ def CountCommitsToBranch():
Return:
Number of patches that exist on top of the branch
"""
- pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'],
+ pipe = [['git', 'log', '--no-color', '--oneline', '--no-decorate',
+ '@{upstream}..'],
['wc', '-l']]
stdout = command.RunPipe(pipe, capture=True, oneline=True).stdout
patch_count = int(stdout)
@@ -92,7 +93,8 @@ def CountCommitsInBranch(git_dir, branch, include_upstream=False):
Number of patches that exist on top of the branch
"""
range_expr = GetRangeInBranch(git_dir, branch, include_upstream)
- pipe = [['git', '--git-dir', git_dir, 'log', '--oneline', range_expr],
+ pipe = [['git', '--git-dir', git_dir, 'log', '--oneline', '--no-decorate',
+ range_expr],
['wc', '-l']]
result = command.RunPipe(pipe, capture=True, oneline=True)
patch_count = int(result.stdout)
@@ -106,7 +108,7 @@ def CountCommits(commit_range):
Return:
Number of patches that exist on top of the branch
"""
- pipe = [['git', 'log', '--oneline', commit_range],
+ pipe = [['git', 'log', '--oneline', '--no-decorate', commit_range],
['wc', '-l']]
stdout = command.RunPipe(pipe, capture=True, oneline=True).stdout
patch_count = int(stdout)