From 106c5af97f3d9e7f21f41b3de679704f28943a8a Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Sun, 27 Dec 2020 12:25:51 +0100 Subject: [PATCH] mrlib: ignore batch separator line from git-cat-file Signed-off-by: Frantisek Hrbata --- mrlib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mrlib.py b/mrlib.py index 2349533..cf2a2fb 100755 --- a/mrlib.py +++ b/mrlib.py @@ -262,6 +262,8 @@ def load_tags(mrs, refs=None, users=None, commits=True, squash=False): rv, out, err = run(["git", "cat-file", "--batch"], stdin=stdin) + batch_re = re.compile("[0-9a-f]{40}\s+blob") + mr = None user = None commit = None @@ -269,6 +271,10 @@ def load_tags(mrs, refs=None, users=None, commits=True, squash=False): if not line: continue + match = batch_re.match(line) + if match: + continue + tag, value = line.split(None, 1) if tag == "@m": mr = value -- 1.7.10.4