Re: delete deprecated refs to release disk space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

2011/11/14 18:25:25 +0400 Peter Vereshagin <peter@xxxxxxxxxxxxxx> => 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@xxxxxxxxxxxxxx> (http://vereshagin.org) pgp: A0E26627 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]