Re: git svn clone/fetch hits issues with gc --auto
- From
- Eric Wong <e@80x24.org>
- Date
- Oct 9, 2018, 23:45 UTC
- Message-ID
- <20181009234502.oxzfwirjcew2sxrm@dcvr>
- In-Reply-To
- <CACPiFCKQq--xrMf1nF=1MmC+eESE_aKms3yogoRwCY=YxcOWXA@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> wrote:
Show 8 quoted lines
> Hi folks, > > Long time no see! Importing a 3GB (~25K revs, tons of files) SVN repo > I hit the gc error: > > warning: There are too many unreachable loose objects; run 'git prune' > to remove them. > gc --auto: command returned error: 255
GC can be annoying when that happens... For git-svn, perhaps this can be appropriate to at least allow the import to continue:
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 76b2965905..9b0caa3d47 100644 --- a/perl/Git/SVN.pm +++ b/perl/Git/SVN.pm @@ -999,7 +999,7 @@ sub restore_commit_header_env { } sub gc { - command_noisy('gc', '--auto'); + eval { command_noisy('gc', '--auto') }; }; sub do_git_commit { But yeah, somebody else who works on git regularly could probably stop repack from writing thousands of loose objects (and instead write a self-contained pack with those objects, instead). I haven't followed git closely lately, myself.