From bd5bed24e78577ae55b8f789c10b240231685b42 Mon Sep 17 00:00:00 2001 From: Vladislav Javadov Date: Thu, 9 Sep 2021 09:00:55 +0300 Subject: [PATCH] filter-repo: add --no-gc option --- git-filter-repo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-filter-repo b/git-filter-repo index ae71fad..aa45252 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -1985,6 +1985,8 @@ EXAMPLES "--refname-callback options such that instead of replacing " "old refs with new refnames, it will instead create new " "refs and keep the old ones around. Use with caution.")) + misc.add_argument('--no-gc', action='store_true', + help=_("Do not run 'git gc' after filtering.")) # WARNING: --refs presents a problem with become-degenerate pruning: # * Excluding a commit also excludes its ancestors so when some other # commit has an excluded ancestor as a parent we have no way of @@ -2214,7 +2216,7 @@ EXAMPLES args.strip_blobs_with_ids = set() if (args.partial or args.refs) and not args.replace_refs: args.replace_refs = 'update-no-add' - args.repack = not (args.partial or args.refs) + args.repack = not (args.partial or args.refs or args.no_gc) if args.refs or args.source or args.target: args.partial = True if not args.refs: