Patchwork [U-Boot] patman: fix gitutil for decorations

login
register
mail settings
Submitter Andreas Bießmann
Date April 16, 2013, 9:30 a.m.
Message ID <1366104623-14911-1-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/236876/
State Superseded
Headers show

Comments

Andreas Bießmann - April 16, 2013, 9:30 a.m.
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>
Cc: Tom Rini <trini@ti.com>
Cc: Simon Glass <sjg@chromium.org>
---

Since this is required for me to get patman working it would be great to have
this trivial change in the upcoming release.

 tools/patman/gitutil.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index f485750..8b61410 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)