diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-05 21:41:51 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-24 19:25:15 -0600 |
commit | 262130f57c398d7a548cf55fdc278efe561c7afb (patch) | |
tree | 76f2c81e8cefd4205127f8810964e3c071b59c03 /tools/patman/patchstream.py | |
parent | fd70986a62afc291d3fbc172dc0c7219dc84d4b7 (diff) |
patman: Allow creating patches for another branch
Add a -b option to allow patches to be created from a branch other than
the current one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r-- | tools/patman/patchstream.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 4fe465e9ab..2ea8ebcc3f 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -512,17 +512,19 @@ def GetMetaDataForList(commit_range, git_dir=None, count=None, ps.Finalize() return series -def GetMetaData(start, count): +def GetMetaData(branch, start, count): """Reads out patch series metadata from the commits This does a 'git log' on the relevant commits and pulls out the tags we are interested in. Args: - start: Commit to start from: 0=HEAD, 1=next one, etc. + branch: Branch to use (None for current branch) + start: Commit to start from: 0=branch HEAD, 1=next one, etc. count: Number of commits to list """ - return GetMetaDataForList('HEAD~%d' % start, None, count) + return GetMetaDataForList('%s~%d' % (branch if branch else 'HEAD', start), + None, count) def GetMetaDataForTest(text): """Process metadata from a file containing a git log. Used for tests |