@@ -454,7 +454,8 @@ <h2 id="_synopsis">SYNOPSIS</h2>
454454< div class ="verseblock ">
455455< pre class ="content "> < em > git maintenance</ em > run [<options>]
456456< em > git maintenance</ em > start [--scheduler=<scheduler>]
457- < em > git maintenance</ em > (stop|register|unregister) [<options>]</ pre >
457+ < em > git maintenance</ em > (stop|register|unregister) [<options>]
458+ < em > git maintenance</ em > is-needed [<options>]</ pre >
458459</ div >
459460</ div >
460461</ div >
@@ -559,6 +560,18 @@ <h2 id="_subcommands">SUBCOMMANDS</h2>
559560when the current repository is not registered.</ p >
560561</ div >
561562</ dd >
563+ < dt class ="hdlist1 "> is-needed</ dt >
564+ < dd >
565+ < p > Check whether maintenance needs to be run without actually running it.
566+ Exits with a 0 status code if maintenance needs to be run, 1 otherwise.
567+ Ideally used with the < em > --auto</ em > flag.</ p >
568+ < div class ="paragraph ">
569+ < p > If one or more < code > --task</ code > options are specified, then those tasks are checked
570+ in that order. Otherwise, the tasks are determined by which
571+ < code > maintenance.</ code > < em > <task></ em > < code > .enabled</ code > config options are true. By default, only
572+ < code > maintenance.gc.enabled</ code > is true.</ p >
573+ </ div >
574+ </ dd >
562575</ dl >
563576</ div >
564577</ div >
@@ -684,7 +697,9 @@ <h2 id="_options">OPTIONS</h2>
684697runs when the number of loose objects exceeds the number stored
685698in the < code > gc.auto</ code > config setting, or when the number of pack-files
686699exceeds the < code > gc.autoPackLimit</ code > config setting. Not compatible with
687- the < code > --schedule</ code > option.</ p >
700+ the < code > --schedule</ code > option.
701+ When combined with the < code > is-needed</ code > subcommand, check if the required
702+ thresholds are met without actually running maintenance.</ p >
688703</ dd >
689704< dt class ="hdlist1 "> --schedule</ dt >
690705< dd >
@@ -1161,7 +1176,7 @@ <h2 id="_git">GIT</h2>
11611176</ div >
11621177< div id ="footer ">
11631178< div id ="footer-text ">
1164- Last updated 2025-06-20 18:10:42 -0700
1179+ Last updated 2025-11-21 14:01:32 -0800
11651180</ div >
11661181</ div >
11671182</ body >
0 commit comments