summaryrefslogtreecommitdiff
path: root/tools/patman/patchstream.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-08-09 15:33:10 -0600
committerSimon Glass <sjg@chromium.org>2014-08-13 08:34:16 -0600
commitcda2a611520e679495e7d2cf8e436b0df9afc675 (patch)
tree5559b72e582fa804c179c82cf5a6bf527f90e9e6 /tools/patman/patchstream.py
parent3b74ba5f1af147df0aea243976f7064a2734d551 (diff)
downloadu-boot-imx-cda2a611520e679495e7d2cf8e436b0df9afc675.zip
u-boot-imx-cda2a611520e679495e7d2cf8e436b0df9afc675.tar.gz
u-boot-imx-cda2a611520e679495e7d2cf8e436b0df9afc675.tar.bz2
patman: Move the 'git log' command into a function
Move the code that builds a 'git log' command into a function so we can more easily adjust it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r--tools/patman/patchstream.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 3228719..0040468 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -379,14 +379,9 @@ def GetMetaDataForList(commit_range, git_dir=None, count=None,
Returns:
A Series object containing information about the commits.
"""
- params = ['git', 'log', '--no-color', '--reverse', '--no-decorate',
- commit_range]
- if count is not None:
- params[2:2] = ['-n%d' % count]
- if git_dir:
- params[1:1] = ['--git-dir', git_dir]
- pipe = [params]
- stdout = command.RunPipe(pipe, capture=True).stdout
+ params = gitutil.LogCmd(commit_range,reverse=True, count=count,
+ git_dir=git_dir)
+ stdout = command.RunPipe([params], capture=True).stdout
ps = PatchStream(series, is_log=True)
for line in stdout.splitlines():
ps.ProcessLine(line)