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

Re: [PATCH 2/2] builtin/receive-pack: convert to use git-maintenance(1)

From
Karthik Nayak <karthik.188@gmail.com>
Date
Apr 17, 2024, 16:50 UTC
Message-ID
<CAOLa=ZQhv5m4RPwsQg1F2zLU86qjE9Ew6FhCpOsPWWM3FoHATw@mail.gmail.com>
In-Reply-To
<c7bcc83d3a96b613db4fba9edfbb6d964b338ed5.1713334241.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 25 quoted lines
> In 850b6edefa (auto-gc: extract a reusable helper from "git fetch",
> 2020-05-06), we have introduced a helper function `run_auto_gc()` that
> kicks off `git gc --auto`. The intent of this function was to pass down
> the "--quiet" flag to git-gc(1) as required without duplicating this at
> all callsites. In 7c3e9e8cfb (auto-gc: pass --quiet down from am,
> commit, merge and rebase, 2020-05-06) we then converted callsites that
> need to pass down this flag to use the new helper function. This has the
> notable omission of git-receive-pack(1), which is the only remaining
> user of `git gc --auto` that sets up the proccess manually. This is
> probably because it unconditionally passes down the `--quiet` flag and
> thus didn't benefit much from the new helper function.
>
> In a95ce12430 (maintenance: replace run_auto_gc(), 2020-09-17) we then
> replaced `run_auto_gc()` with `run_auto_maintenance()` which invokes
> git-maintenance(1) instead of git-gc(1). This command is the modern
> replacement for git-gc(1) and is both more thorough and also more
> flexible because administrators can configure which tasks exactly to run
> during maintenance.
>
> But due to git-receive-pack(1) not using `run_auto_gc()` in the first
> place it did not get converted to use git-maintenance(1) like we do
> everywhere else now. Address this oversight and start to use the newly
> introduced function `prepare_auto_maintenance()`. This will also make it
> easier for us to adapt this code together with all the other callsites
> that invoke auto-maintenance in the future.
This commit explains my earlier question. Thanks.
Previous: Patrick SteinhardtNext: Karthik Nayak
Message 6 of 9 in “builtin/receive-pack: convert to use git-maintenance(1)”
  1. 0/2 builtin/receive-pack: convert to use git-maintenance(1)Patrick Steinhardt, Apr 17, 2024
  2. 1/2 run-command: introduce function to prepare auto-maintenance processPatrick Steinhardt, Apr 17, 2024
  3. Junio C HamanoApr 17, 2024
  4. Patrick SteinhardtApr 18, 2024
  5. 2/2 builtin/receive-pack: convert to use git-maintenance(1)Patrick Steinhardt, Apr 17, 2024
  6. Karthik NayakApr 17, 2024
  7. Karthik NayakApr 17, 2024
  8. Junio C HamanoApr 17, 2024
  9. Patrick SteinhardtApr 18, 2024

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.