git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git svn clone/fetch hits issues with gc --auto

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Oct 10, 2018, 11:01 UTC
Message-ID
<CACPiFCL0oTjN+-aYgKEDtKC0gYwkv6RLMwakdJV85PJ5XQej6g@mail.gmail.com>
In-Reply-To
<xmqqd0sims6s.fsf@gitster-ct.c.googlers.com>

Looking around, Jonathan Tan's "[PATCH] gc: do not warn about too many loose objects" makes sense to me.

- remove unactionable warning
- as the warning is gone, no gc.log is produced
- subsequent gc runs don't exit due to gc.log
My very humble +1 on that.

As for downsides... if we have truly tons of _recent_ loose objects, it'll ... take disk space? I'm fine with that.

For more aggressive gc options, thoughts:
 - Do we always consider git gc --prune=now "safe" in a "won't delete
stuff the user is likely to want" sense? For example -- are the
references from reflogs enough safety?
 - Even if we don't, for some commands it should be safe to run git gc
--prune=now at the end of the process, for example an import that
generates a new git repo (git svn clone).
cheers,

m On Tue, Oct 9, 2018 at 10:49 PM Junio C Hamano <gitster@pobox.com> wrote:

Show 39 quoted lines
>
> Forwarding to Jonathan, as I think this is an interesting supporting
> vote for the topic that we were stuck on.
>
> Eric Wong <e@80x24.org> writes:
>
> > Martin Langhoff <martin.langhoff@gmail.com> wrote:
> >> 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.
-- 
 martin.langhoff@gmail.com
 - ask interesting questions  ~  http://linkedin.com/in/martinlanghoff
 - don't be distracted        ~  http://github.com/martin-langhoff
   by shiny stuff
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 4 of 26 in “git svn clone/fetch hits issues with gc --auto”
  1. Martin LanghoffOct 9, 2018
  2. Eric WongOct 9, 2018
  3. Junio C HamanoOct 10, 2018
  4. Martin LanghoffOct 10, 2018
  5. Ævar Arnfjörð BjarmasonOct 10, 2018
  6. Martin LanghoffOct 10, 2018
  7. Ævar Arnfjörð BjarmasonOct 10, 2018
  8. Jonathan NiederOct 10, 2018
  9. Jeff KingOct 10, 2018
  10. gc: introduce an --auto-exit-code option for undoing 3029970275Ævar Arnfjörð Bjarmason, Oct 10, 2018
  11. Jeff KingOct 10, 2018
  12. Ævar Arnfjörð BjarmasonOct 10, 2018
  13. Jeff KingOct 11, 2018
  14. Jonathan NiederOct 10, 2018
  15. Ævar Arnfjörð BjarmasonOct 10, 2018
  16. Jonathan NiederOct 10, 2018
  17. Junio C HamanoOct 10, 2018
  18. Jonathan NiederOct 10, 2018
  19. Ævar Arnfjörð BjarmasonOct 10, 2018
  20. Jonathan NiederOct 10, 2018
  21. Ævar Arnfjörð BjarmasonOct 10, 2018
  22. Ævar Arnfjörð BjarmasonOct 10, 2018
  23. Junio C HamanoOct 10, 2018
  24. Ævar Arnfjörð BjarmasonOct 10, 2018
  25. Martin LanghoffOct 10, 2018
  26. Ævar Arnfjörð BjarmasonOct 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.