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

Re: delete deprecated refs to release disk space

From
Peter Vereshagin <peter@vereshagin.org>
Date
Nov 16, 2011, 23:44 UTC
Message-ID
<20111116234422.GA5131@external.screwed.box>
In-Reply-To
<20111114142525.GB8641@external.screwed.box>
Hello.

2011/11/14 18:25:25 +0400 Peter Vereshagin <peter@vereshagin.org> => To ??var Arnfj??r?? Bjarmason : PV> N commits ago is a fine setting for me as it's a cron job backup. Thanks?

* = Thanks!
Here is the PoC QnD code that releases disk space for me by far:
    git rev-list --all --timestamp |\
        perl -Mstrict -MTime::ParseDate -wE \
            'my $match = 0; my $expire = parsedate( "3 days ago" ); while (<>)
                { chomp; my ( $tstamp => $graft_id ) = split /\s+/;
                    if ( not( $match ) and $tstamp < $expire )
                        { say $graft_id; $match = 1; } }
            ' > .git/info/grafts && \
    git filter-branch -f
for case a one shall seek for it.

-- Peter Vereshagin <peter@vereshagin.org> (http://vereshagin.org) pgp: A0E26627

Previous: Peter Vereshagin
Message 4 of 4 in “delete deprecated refs to release disk space”
  1. Peter VereshaginNov 13, 2011
  2. Ævar Arnfjörð BjarmasonNov 13, 2011
  3. Peter VereshaginNov 14, 2011
  4. Peter VereshaginNov 16, 2011

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.