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())
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_GC_AGGRESSIVE_DEPTH
Default value of maximum delta chain depth during aggressive garbage collection: |
| public static final int | DEFAULT_GC_AGGRESSIVE_WINDOW
Default window size during packing during aggressive garbage collection: * |
| private Instant | |
| private ProgressMonitor | |
| private Boolean | |
| private PackConfig |
| Access | Constructor and Description |
|---|---|
| protected | GarbageCollectCommand(Repository
a repo)org. object.Constructor for GarbageCollectCommand. |
| Modifier and Type | Method and Description |
|---|---|
| public Properties | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| public Properties | |
| public GarbageCollectCommand | Returns: this instancewhether to turn on or off aggressive mode aggressive)Whether to use aggressive mode or not. |
| public GarbageCollectCommand | Returns: this instanceminimal age of objects to be pruned. expire)
Deprecated
since 7.2. use
setExpire(Instant) instead
During gc() or prune() each unreferenced, loose object which has been
created or modified after |
| public GarbageCollectCommand | |
| public GarbageCollectCommand | Returns: this instancewhether to include objects in `.keep` files when repacking. packKeptObjects)Whether to include objects in `.keep` packs when repacking. |
| public GarbageCollectCommand | Returns: this instancewhether to preserve old pack files preserveOldPacks)Whether to preserve old pack files instead of deleting them. |
| public GarbageCollectCommand | Returns: this instancea progress monitor monitor)Set progress monitor |
| public GarbageCollectCommand | Returns: this instancewhether to prune preserved pack files prunePreserved)Whether to prune preserved pack files in the preserved directory. |
| private static Properties |
| DEFAULT_GC_AGGRESSIVE_DEPTH | back to summary |
|---|---|
| public static final int DEFAULT_GC_AGGRESSIVE_DEPTH Default value of maximum delta chain depth during aggressive garbage collection:
| |
| DEFAULT_GC_AGGRESSIVE_WINDOW | back to summary |
|---|---|
| public static final int DEFAULT_GC_AGGRESSIVE_WINDOW Default window size during packing during aggressive garbage collection: *
| |
| expire | back to summary |
|---|---|
| private Instant expire | |
| monitor | back to summary |
|---|---|
| private ProgressMonitor monitor | |
| packKeptObjects | back to summary |
|---|---|
| private Boolean packKeptObjects | |
| pconfig | back to summary |
|---|---|
| private PackConfig pconfig | |
| GarbageCollectCommand | back to summary |
|---|---|
| protected GarbageCollectCommand(Repository repo) Constructor for GarbageCollectCommand.
| |
| call | back to summary |
|---|---|
| public Properties call() throws GitAPIException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
| |
| getStatistics | back to summary |
|---|---|
| public Properties getStatistics() throws GitAPIException Computes and returns the repository statistics.
| |
| setAggressive | back to summary |
|---|---|
| public GarbageCollectCommand setAggressive(boolean aggressive) Whether to use aggressive mode or not. If set to true JGit behaves more
similar to native git's "git gc --aggressive". If set to
| |
| setExpire | back to summary |
|---|---|
| public GarbageCollectCommand setExpire(Date expire)
During gc() or prune() each unreferenced, loose object which has been
created or modified after
| |
| setExpire | back to summary |
|---|---|
| public GarbageCollectCommand setExpire(Instant expire) During gc() or prune() each unreferenced, loose object which has been
created or modified after
| |
| setPackKeptObjects | back to summary |
|---|---|
| public GarbageCollectCommand setPackKeptObjects(boolean packKeptObjects) Whether to include objects in `.keep` packs when repacking.
| |
| setPreserveOldPacks | back to summary |
|---|---|
| public GarbageCollectCommand setPreserveOldPacks(boolean preserveOldPacks) Whether to preserve old pack files instead of deleting them.
| |
| setProgressMonitor | back to summary |
|---|---|
| public GarbageCollectCommand setProgressMonitor(ProgressMonitor monitor) Set progress monitor
| |
| setPrunePreserved | back to summary |
|---|---|
| public GarbageCollectCommand setPrunePreserved(boolean prunePreserved) Whether to prune preserved pack files in the preserved directory.
| |
| toProperties | back to summary |
|---|---|
private static Properties toProperties(GC.
| |