Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] GarbageCollectCommand does not prune unreferenced commit

On Wed, Apr 6, 2016 at 10:48 AM, R�diger Herrmann
<ruediger.herrmann@xxxxxx> wrote:
> Hi All,
>
> I found the GC command does not work as I would expect and so I am asking
> for your help to clarify what/who is wrong here. My understand is that an
> unreferenced commit that is 'old' enough would be pruned, but apparently the
> commit remains in the repository after garbage collection.
>
> This test probably illustrates best what I am trying (please paste into
> GarbageCollectCommandTest to run it). Since the 'orphan' commit object is
> marked as one year old and 'setExpire' is set to now, I thought the commit
> would be pruned but according to the assert, it is not.
>
>  @Test public void testPruneOldOrphanCommit() throws Exception { RevCommit
> orphan = git.commit().setMessage("orphan").call();

Doesn't this update HEAD to point to the commit it made? In which case
its reachable and cannot be garbage collected.


Back to the top