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

Re: Consider adding pruning of refs to git maintenance

From
Shubham Kanodia <shubham.kanodia10@gmail.com>
Date
Dec 23, 2024, 09:30 UTC
Message-ID
<CAG=Um+1wDY=3cxfXZxk_-vQcabogHgxGHaJ0utg+0NC2bmiXSA@mail.gmail.com>
In-Reply-To
<xmqqwmfr112w.fsf@gitster.g>
On Mon, Dec 23, 2024 at 9:51 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> as long as you promise that you never run "git fetch" without saying
> which exact refs to fetch.  I wonder if it helps to introduce a new
> configuration remote.*.fetchmap
>
>     [remote "origin"]
>         fetchmap = +refs/heads/*:refs/remotes/origin/*
>
> that only talks about how the mapping goes without saying what gets
> fetched by default, so that the lack of remote.origin.fetch would
> cause
>
>     $ git fetch origin
>     $ git fetch
>
> not to grab everything (like when you had the same specification as
> the value of remote.origin.fetch instead), but allows you to map
> whatever you grab from there when you did

This would be perfect really. Adding a new refmap every time you need to pull in changes from someone else's branch is too cumbersome. I'd be happy to attempt this as a follow up patch where `remote.<remote>.fetchmap` if you think that's possible to add.

Also to keep things cleaner — I'm going to re-submit this patch using gitgitgadget separately.

Thanks! Shubham K

Previous: Junio C Hamano
Message 11 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.