From e8abb43f495b60acb12a5a7ca035c66599bf7134 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 18 Feb 2016 01:36:47 -0500 Subject: [PATCH] git-repack: trim reflog history too --- .bin/git-repack | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bin/git-repack b/.bin/git-repack index d218a99..b225fca 100755 --- a/.bin/git-repack +++ b/.bin/git-repack @@ -141,6 +141,10 @@ def repack(path): else: rundir = path + cmd = ['git', '--git-dir', rundir, 'reflog', 'expire', '--all', '--stale-fix'] + print('Cleaning reflog: %s' % ' '.join(cmd)) + subprocess.check_call(cmd, cwd='/') + # This also packs refs/tags for us. cmd = ['git', '--git-dir', rundir, 'gc', '--aggressive', '--prune=all'] print('Repacking git repo: %s' % ' '.join(cmd)) -- 2.39.5