Add "aggressive" option to ssh command "GC"
When triggering a garbage collection through ssh it can be specified whether to run an aggressive garbage collection or not. Change-Id: Icfecc69915870289f5957912d3d53348f21a83f7
This commit is contained in:
parent
2f94e2e562
commit
219f865fee
@ -8,6 +8,7 @@ gerrit gc - Run the Git garbage collection
|
||||
'ssh' -p <port> <host> 'gerrit gc'
|
||||
[--all]
|
||||
[--show-progress]
|
||||
[--aggressive]
|
||||
<NAME> ...
|
||||
--
|
||||
|
||||
@ -44,6 +45,9 @@ This command is intended to be used in scripts.
|
||||
--show-progress::
|
||||
If specified progress information is shown.
|
||||
|
||||
--aggressive::
|
||||
If an aggressive garbage collection should be done.
|
||||
|
||||
== EXAMPLES
|
||||
|
||||
Run the Git garbage collection for the projects 'myProject' and
|
||||
|
@ -46,6 +46,9 @@ public class GarbageCollectionCommand extends SshCommand {
|
||||
@Option(name = "--show-progress", usage = "progress information is shown")
|
||||
private boolean showProgress;
|
||||
|
||||
@Option(name = "--aggressive", usage = "run aggressive garbage collection")
|
||||
private boolean aggressive;
|
||||
|
||||
@Argument(index = 0, required = false, multiValued = true, metaVar = "NAME",
|
||||
usage = "projects for which the Git garbage collection should be run")
|
||||
private List<ProjectControl> projects = new ArrayList<>();
|
||||
@ -85,7 +88,8 @@ public class GarbageCollectionCommand extends SshCommand {
|
||||
}
|
||||
|
||||
GarbageCollectionResult result =
|
||||
garbageCollectionFactory.create().run(projectNames, showProgress ? stdout : null);
|
||||
garbageCollectionFactory.create().run(projectNames, aggressive,
|
||||
showProgress ? stdout : null);
|
||||
if (result.hasErrors()) {
|
||||
for (GarbageCollectionResult.Error e : result.getErrors()) {
|
||||
String msg;
|
||||
|
Loading…
Reference in New Issue
Block a user