scripts/git-cherry-gerrit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 1f68bc85ef2e55800d907ed2f01e967fecfcedc2 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Jan 19 09:10:02 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Jan 19 09:10:42 2021 +0100 git-cherry-gerrit.py: handle empty output from git rev-list This didn't matter in bash, but it matters in Python: an empty string is not the same as a list with one empty string. Change-Id: I36f4345b8f3760d33f8d8755bb03081893b812a7 diff --git a/scripts/git-cherry-gerrit.py b/scripts/git-cherry-gerrit.py index 6a0cf9e..df7e0c0 100755 --- a/scripts/git-cherry-gerrit.py +++ b/scripts/git-cherry-gerrit.py @@ -62,7 +62,10 @@ def main() -> None: branch_point = merge_base to_change_ids = [] - to_hashes = from_pipe(["git", "rev-list", merge_base + ".." + cherry_to]).split("\n") + to_hash_string = from_pipe(["git", "rev-list", merge_base + ".." + cherry_to]) + to_hashes = [] + if to_hash_string: + to_hashes = to_hash_string.split("\n") git_cat_file = subprocess.Popen(['git', 'cat-file', '--batch'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) for to_hash in to_hashes: to_change_ids.append(get_change_id(git_cat_file, to_hash)) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits