From 5c804747132c1b8d1799817569845f7f22ff3b0b Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 15 Mar 2019 09:48:53 -0700 Subject: [PATCH] filter-repo: fix an incorrect exit While most users of filter-repo will just use it as a tool and RepoFilter.run() is the final function, filter-repo can be used as a library with additional work being done after calling that function. So, simply return from that function when it is done rather than calling sys.exit. Signed-off-by: Elijah Newren --- git-filter-repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-filter-repo b/git-filter-repo index fa86b5f..fbe9a6f 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -3098,7 +3098,7 @@ class RepoFilter(object): print("NOTE: Not running fast-import or cleaning up; --dry-run passed.") print(" Requested filtering can be seen {}".format(orig_str)) print(" " + self._fe_filt) - sys.exit(0) + return target_working_dir = self._args.target or '.' if self._input: