Home Home > GIT Browse > scripts
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@suse.com>2018-06-27 10:51:30 +0900
committerBenjamin Poirier <bpoirier@suse.com>2018-08-23 16:58:08 +0900
commit76744640515ddd6cde00e1857e32577d6350e0cc (patch)
treeef71628d8aabfdfb995f14e354c4dc4d1bee7717
parent45100db1f9ad0a85776a1563567f62c5a8be399a (diff)
scripts/git_sort/series_conf.py: Fix Patch parameter
Fixes: e68bd465cdc4 ("git-sort: Rewrite Patch class to read bytes instead of str")
-rwxr-xr-xscripts/git_sort/series_conf.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/git_sort/series_conf.py b/scripts/git_sort/series_conf.py
index 6bdb30e93f..a3ea04e3cf 100755
--- a/scripts/git_sort/series_conf.py
+++ b/scripts/git_sort/series_conf.py
@@ -94,10 +94,16 @@ filter_series = lambda lines : [firstword(line) for line in lines
@contextlib.contextmanager
def find_commit(commit, series, mode="rb"):
"""
+ commit: unabbreviated git commit id
+ series: list of lines from series.conf
+ mode: mode to open the patch files in, should be "rb" or "r+b"
+
Caller must chdir to where the entries in series can be found.
+
+ Returns patch.Patch instances
"""
for name in filter_series(series):
- patch = Patch(open(name, mode="rb"))
+ patch = Patch(open(name, mode=mode))
found = False
if commit in [firstword(value)
for value in patch.get("Git-commit")