diff options
author | Simon Glass <sjg@chromium.org> | 2025-05-07 18:06:52 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-27 10:07:42 +0100 |
commit | a5afb75c6dcadeb22bb24d931170766f7af4c58c (patch) | |
tree | d53e60ee7fee51c16b0cac677d4cb3e031f49713 /tools/patman/patchstream.py | |
parent | 60b8709b980a30a9ae2e4a702cb2ac5e117d2a92 (diff) |
patman: Allow setting a git directory when sending
Support specifying the git-directory when creating and sending patches.
This will allow better testing of this functionality, since we can use a
test directory.
For count_commits_to_branch() support an end commit while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r-- | tools/patman/patchstream.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 3ec06a6b5f5..5691ee4b3c1 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -754,7 +754,7 @@ def get_metadata_for_list(commit_range, git_dir=None, count=None, pst.finalise() return series -def get_metadata(branch, start, count): +def get_metadata(branch, start, count, git_dir=None): """Reads out patch series metadata from the commits This does a 'git log' on the relevant commits and pulls out the tags we @@ -769,8 +769,9 @@ def get_metadata(branch, start, count): Series: Object containing information about the commits. """ top = f"{branch if branch else 'HEAD'}~{start}" - series = get_metadata_for_list(top, None, count) - series.base_commit = commit.Commit(gitutil.get_hash(f'{top}~{count}')) + series = get_metadata_for_list(top, git_dir, count) + series.base_commit = commit.Commit( + gitutil.get_hash(f'{top}~{count}', git_dir)) series.branch = branch or gitutil.get_branch() series.top = top return series |