diff --git a/git-filter-repo b/git-filter-repo index a40bce54..c0ad7bcb 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -4466,11 +4466,6 @@ class RepoFilter(object): self._finalize_handled = True self._done_callback and self._done_callback() - if self._file_info_value: - self._file_info_value.finalize() - if not self._args.quiet: - self._progress_writer.finish() - def _ref_update(self, target_working_dir): # Start the update-ref process p = subproc.Popen('git update-ref --no-deref --stdin'.split(), @@ -4898,6 +4893,12 @@ class RepoFilter(object): raise SystemExit(_("Error: fast-export failed; see above.")) # pragma: no cover self._input.close() + # Do some final cleanup + if self._file_info_value: + self._file_info_value.finalize() + if not self._args.quiet: + self._progress_writer.finish() + # If we're not the manager of self._output, we should avoid post-run cleanup if not self._managed_output: return