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

Re: Removing old objects from partial clone

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 29, 2023, 08:51 UTC
Message-ID
<CAP8UFD1SwJeAF_n=yTjrDFZg10Y7oBNiQORKSkH=USHQLVfo5g@mail.gmail.com>
In-Reply-To
<83c29b890e7c31e0f174b8a5da22c5b20ce647da.camel@gmail.com>
Hi,
On Wed, Mar 29, 2023 at 2:13 AM <uzytkownik2@gmail.com> wrote:
Show 10 quoted lines
>
> Hi,
>
> I'd like to periodically remove objects which:
>
>  - Are not reachable from newest N commits from any branch
>  - Can be fetched from server if needed
>
> Unfortunatly I work on large repo and git gc doesn't work as all
> objects are still technically reachable.

John Cai and I have been working on a new `--filter` option for `git repack` that might help you but is dangerous to use (as it could remove objects that haven't be pushed which could corrupt the repo).

We haven't been able to get it accepted but you may still find the discussions and code interesting.

See https://lore.kernel.org/git/20221221040446.2860985-1-christian.couder@gmail.com/
Previous: uzytkownik2@gmail.com
Message 2 of 2 in “Removing old objects from partial clone”
  1. uzytkownik2@gmail.comMar 28, 2023
  2. Christian CouderMar 29, 2023

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.