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

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 10, 2018, 08:04 UTC
Message-ID
<87d0sifcsm.fsf@evledraar.gmail.com>
In-Reply-To
<CACPiFCKQq--xrMf1nF=1MmC+eESE_aKms3yogoRwCY=YxcOWXA@mail.gmail.com>
On Tue, Oct 09 2018, Martin Langhoff wrote:
Show 30 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
>
> I don't seem to be the only one --
> https://stackoverflow.com/questions/35738680/avoiding-warning-there-are-too-many-unreachable-loose-objects-during-git-svn
>
> Looking at code history, it dropped the ability to pass options to git
> repack when it was converted it to using git gc.
>
> Experimentally I find that tweaking it to run git gc --auto
> --prune=5.minutes.ago works well, while --prune=now breaks it.
> Attempts to commit fail with missing objects.
>
> - Why does --prune=now break it? Perhaps "gc" runs in the background,
> and races with the commit being prepared?
>
> - Would it be safe, sane to apply --prune=some.value on _clone_?
>
> - During _fetch_, --prune=some.value seems risky. In a checkout being
> actively used for development or merging it'd risk pruning objects
> users expect to be there for recovery. Would there be a safe, sane
> way?
>
> - Is there a safer, saner value than 5 minutes?

What you've found is the least sucky way to work around this right now, but see my https://public-inbox.org/git/87inc89j38.fsf@evledraar.gmail.com/ and https://public-inbox.org/git/87d0vmck55.fsf@evledraar.gmail.com/ for some prior (and recent) discussion of this problem on-list.

FWIW this has nothing to do with git-svn per-se, and also e.g. happens to me when I do a 'git fetch --all' sometimes on git.git.

Previous: Martin Langhoff
Message 26 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.