public class GarbageCollectCommand extends GitCommand<Properties>
gc
command. It has setters for all
supported options and arguments of this command and a call()
method
to finally execute the command. Each instance of this class should only be
used for one invocation of the command (means: one call to call()
)repo
Modifier | Constructor and Description |
---|---|
protected |
GarbageCollectCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
Properties |
call()
Executes the command
|
Properties |
getStatistics()
Computes and returns the repository statistics.
|
GarbageCollectCommand |
setExpire(Date expire)
During gc() or prune() each unreferenced, loose object which has been
created or modified after
expire will not be pruned. |
GarbageCollectCommand |
setProgressMonitor(ProgressMonitor monitor) |
checkCallable, getRepository, setCallable
protected GarbageCollectCommand(Repository repo)
repo
- public GarbageCollectCommand setProgressMonitor(ProgressMonitor monitor)
monitor
- a progress monitorpublic GarbageCollectCommand setExpire(Date expire)
expire
will not be pruned. Only
older objects may be pruned. If set to null then every object is a
candidate for pruning. Use GitDateParser
to parse time formats
used by git gc.expire
- minimal age of objects to be pruned.public Properties call() throws GitAPIException
GitCommand
call
in interface Callable<Properties>
call
in class GitCommand<Properties>
GitAPIException
- or subclass thereof when an error occurspublic Properties getStatistics() throws GitAPIException
GitAPIException
- thrown if the repository statistics cannot be computedCopyright © 2014. All rights reserved.