From 6e7ca39107c149eb30c7d66404d110168e7e3c94 Mon Sep 17 00:00:00 2001 From: Vladislav Javadov Date: Thu, 9 Sep 2021 09:35:22 +0300 Subject: [PATCH] filter-repo: parse blobs after commits Performance gain on blob callbacks, now they applied only to filtered commits. Signed-off-by: Vladislav Javadov --- git-filter-repo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-filter-repo b/git-filter-repo index 3b305b7e..e458109e 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -1497,12 +1497,12 @@ class FastExportParser(object): # Run over the input and do the filtering self._advance_currentline() while self._currentline: - if self._currentline.startswith(b'blob'): + if self._currentline.startswith(b'commit'): + self._parse_commit() + elif self._currentline.startswith(b'blob'): self._parse_blob() elif self._currentline.startswith(b'reset'): self._parse_reset() - elif self._currentline.startswith(b'commit'): - self._parse_commit() elif self._currentline.startswith(b'tag'): self._parse_tag() elif self._currentline.startswith(b'progress'):