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

Auto packing the repository - foreground or background in Windows?

From
Tao Klerks <tao@klerks.biz>
Date
Dec 1, 2022, 12:25 UTC
Message-ID
<CAPMMpoiN=Rj_z9VEJZ4EFhb8gBeqb6H7JhTUBbn-b-t-jHRVnA@mail.gmail.com>
Hi folks,

I came across a Windows user today whose "fetch" operations were taking a long time, because their repository had passed some persistent maintenance-triggering threshold *and* the resulting auto-gc was running in the foreground (and not resolving the maintenance-triggering condition automatically).

The user was seeing, at the end of their fetch, something like:

Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. Enumerating objects: 311322, done. Nothing new to pack. Checking connectivity: 1490123

Eventually, they noticed a subsequent recommendation to run "git prune", after the connectivity check completed, and after they did the git prune, they started getting "bad object" errors on fetch - so there was clearly something else going wrong somewhere...

But my *question* is: Does anyone know where I could/should look to understand why the GC was happening in the foreground, even though the message says it will run in the background?

I don't know how to create the conditions for the auto-GC on demand (how to create lots of loose objects??), so I don't know how to verify whether it ever runs in the background on Windows, or what that might depend on. I saw some discussions in 2016, but I can't tell what the conclusion was; is it simply the case that git has been "lying" about running GC in the background, on windows, for all these years? Or is there something specific going on in this user's environment?

Any info welcome, thank you!
Tao
Next: Derrick Stolee
Message 1 of 7 in “Auto packing the repository - foreground or background in Windows?”
  1. Tao KlerksDec 1, 2022
  2. Derrick StoleeDec 6, 2022
  3. Ævar Arnfjörð BjarmasonDec 6, 2022
  4. Jeff HostetlerDec 6, 2022
  5. Tao KlerksDec 8, 2022
  6. Tao KlerksDec 8, 2022
  7. Derrick StoleeDec 9, 2022

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.