Skip to content

Commit

Permalink
Move finalization of variables to later, to permit second fast-export
Browse files Browse the repository at this point in the history
  • Loading branch information
newren committed Nov 26, 2024
1 parent 0c6bd73 commit 916c788
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions git-filter-repo
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 916c788

Please sign in to comment.