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

Re: Consider adding pruning of refs to git maintenance

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2024, 07:41 UTC
Message-ID
<xmqqcyhq3ge7.fsf@gitster.g>
In-Reply-To
<Z2Emh42DJkHFGWq7@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 10 quoted lines
> If we want to have such a feature I'd thus claim that it would be most
> sensible to make it opt-in rather than opt-out. I wouldn't want to be
> surprised by remote refs vanishing after going to bed, but may be okay
> with it when I explicitly ask for it.
>
> At that point one has to raise the question whether it is still all that
> useful compared to running `git remote prune` manually every now and
> then. Mostly because explicitly configuring maintenance is probably
> something that only power users would do, and those power users would
> likely know to prune manually.

I am 100% in agreement with your reasoning. If this thing is to exist, it has to be opt-in. We also need to add ample warning why doing this asynchronously behind user's back while the user could be working in the same repository is prone to cause surprises in the documentation in big red letters.

I however am OK with the idea of having it as an optional "task" that is disabled by default in "git maintenance". "git maintenance" can be viewed as a platform-neutral way to set up scheduled tasks.

A user may be a Git expert who knows what `git remote prune` does, and understands and accepts the risk of confusion doing so without explicit "do it now" from the end-user, but may not be a Linux or a macOS or a Windows expert to know how to write crontab or its equivalents on various schemes to define scheduled tasks.

Thanks.
Previous: Patrick SteinhardtNext: Shubham Kanodia
Message 3 of 11 in “Consider adding pruning of refs to git maintenance”
  1. Shubham KanodiaDec 16, 2024
  2. Patrick SteinhardtDec 17, 2024
  3. Junio C HamanoDec 17, 2024
  4. Shubham KanodiaDec 17, 2024
  5. Shubham KanodiaDec 17, 2024
  6. Junio C HamanoDec 17, 2024
  7. Shubham KanodiaDec 18, 2024
  8. Junio C HamanoDec 18, 2024
  9. Shubham KanodiaDec 22, 2024
  10. Junio C HamanoDec 23, 2024
  11. Shubham KanodiaDec 23, 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.