Git maintenance logs

171 Views Asked by At

I am using the git-maintenance feature.

It is hopefully working well, but I would like to be able to check logs to make sure of that. Are there any such logs? Where?

I'm particularly interested in the answer for macOS. I have checked the .plist config files, but they do not mention any log files. I have searched in the console app, but found nothing.

1

There are 1 best solutions below

0
On

Looking at the source code, it doesn't seem like maintenance is doing any logging of its own. Instead, it delegates work to the existing functions in gc.c.

From the initial commit 2057d750 (Sep 17, 2020):

For now, the 'maintenance' builtin is a thin shim over the 'gc' builtin. In fact, the only option is the '--auto' toggle, which is handed directly to the 'gc' builtin. The current change is isolated to this simple operation to prevent more interesting logic from being lost in all of the boilerplate of adding a new builtin.

Use existing builtin/gc.c file because we want to share code between the two builtins. It is possible that we will have 'maintenance' replace the 'gc' builtin entirely at some point, leaving 'git gc' as an alias for some specific arguments to 'git maintenance run'.

The functionality of git-maintenance is indeed implemented in gc.c as a series of functions whose names start with maintenance_.