diff --git a/RelNotes/2.53.0.adoc b/RelNotes/2.53.0.adoc index b0b3dc9b3..997ae7476 100644 --- a/RelNotes/2.53.0.adoc +++ b/RelNotes/2.53.0.adoc @@ -1,6 +1,13 @@ Git v2.53 Release Notes ======================= +UI, Workflows & Features +------------------------ + + * "git maintenance" command learned "is-needed" subcommand to tell if + it is necessary to perform various maintenance tasks. + + Performance, Internal Implementation, Development Support etc. -------------------------------------------------------------- @@ -10,3 +17,15 @@ Performance, Internal Implementation, Development Support etc. * Some ref backend storage can hold not just the object name of an annotated tag, but the object name of the object the tag points at. The code to handle this information has been streamlined. + + * As "git diff --quiet" only cares about the existence of any + changes, disable rename/copy detection to skip more expensive + processing whose result will be discarded anyway. + + +Fixes since v2.51 +----------------- + + * Ever since we added whitespace rules for this project, we misspelt + an entry, which has been corrected. + (merge 358e94dc70 jc/gitattributes-whitespace-no-indent-fix later to maint). diff --git a/git-maintenance.adoc b/git-maintenance.adoc index 540b5cf68..bda616f14 100644 --- a/git-maintenance.adoc +++ b/git-maintenance.adoc @@ -12,6 +12,7 @@ SYNOPSIS 'git maintenance' run [] 'git maintenance' start [--scheduler=] 'git maintenance' (stop|register|unregister) [] +'git maintenance' is-needed [] DESCRIPTION @@ -84,6 +85,16 @@ The `unregister` subcommand will report an error if the current repository is not already registered. Use the `--force` option to return success even when the current repository is not registered. +is-needed:: + Check whether maintenance needs to be run without actually running it. + Exits with a 0 status code if maintenance needs to be run, 1 otherwise. + Ideally used with the '--auto' flag. ++ +If one or more `--task` options are specified, then those tasks are checked +in that order. Otherwise, the tasks are determined by which +`maintenance..enabled` config options are true. By default, only +`maintenance.gc.enabled` is true. + TASKS ----- @@ -183,6 +194,8 @@ OPTIONS in the `gc.auto` config setting, or when the number of pack-files exceeds the `gc.autoPackLimit` config setting. Not compatible with the `--schedule` option. + When combined with the `is-needed` subcommand, check if the required + thresholds are met without actually running maintenance. --schedule:: When combined with the `run` subcommand, run maintenance tasks diff --git a/git-maintenance.html b/git-maintenance.html index 7bf9a161d..91200e33c 100644 --- a/git-maintenance.html +++ b/git-maintenance.html @@ -454,7 +454,8 @@

SYNOPSIS

git maintenance run [<options>]
 git maintenance start [--scheduler=<scheduler>]
-git maintenance (stop|register|unregister) [<options>]
+git maintenance (stop|register|unregister) [<options>] +git maintenance is-needed [<options>]
@@ -559,6 +560,18 @@

SUBCOMMANDS

when the current repository is not registered.

+
is-needed
+
+

Check whether maintenance needs to be run without actually running it. +Exits with a 0 status code if maintenance needs to be run, 1 otherwise. +Ideally used with the --auto flag.

+
+

If one or more --task options are specified, then those tasks are checked +in that order. Otherwise, the tasks are determined by which +maintenance.<task>.enabled config options are true. By default, only +maintenance.gc.enabled is true.

+
+
@@ -684,7 +697,9 @@

OPTIONS

runs when the number of loose objects exceeds the number stored in the gc.auto config setting, or when the number of pack-files exceeds the gc.autoPackLimit config setting. Not compatible with -the --schedule option.

+the --schedule option. +When combined with the is-needed subcommand, check if the required +thresholds are met without actually running maintenance.

--schedule
@@ -1161,7 +1176,7 @@

GIT