I've set gc.pruneExpire = never
in my repo configuration. When I run git remote update
, I see this process stack:
git remote update
`-git fetch --multiple --all
`-git maintenance run --auto --no-quiet
`-git gc --auto --no-quiet
`-git prune --expire never
... and git prune
runs for several minutes. I'm wondering what it does, as pruning is effectively switched off in this repo.
GIT_TRACE2
log snippet:
16:06:15.068020 run-command.c:738 child_start[3] git prune --expire never
16:06:15.069992 common-main.c:48 version 2.33.0
16:06:15.070006 common-main.c:49 start /usr/libexec/git/git prune --expire never
16:06:15.070180 git.c:456 cmd_name prune (remote/fetch/maintenance/gc/prune)
16:07:10.501223 git.c:714 exit elapsed:55.431555 code:0
16:07:10.501263 trace2/tr2_tgt_normal.c:123 atexit elapsed:55.431631 code:0
16:07:10.684134 run-command.c:993 child_exit[3] pid:4658 code:0 elapsed:55.616096
You can see that it ran for >50s.
Update 2021-09-10: GIT_TRACE2_PERF
output:
10:08:10.599900 common-main.c:48 | d3 | main | version | | | | | 2.33.0
10:08:10.599927 common-main.c:49 | d3 | main | start | | 0.000411 | | | /usr/libexec/git/git gc --auto
--no-quiet
10:08:10.600125 git.c:456 | d3 | main | cmd_name | | | | | gc (remote/fetch/maintenance/g
c)
...
10:08:31.766606 run-command.c:738 | d3 | main | child_start | | 21.167084 | | | [ch3] class:? argv:[git prune
--expire never]
10:08:31.768137 common-main.c:48 | d4 | main | version | | | | | 2.33.0
10:08:31.768154 common-main.c:49 | d4 | main | start | | 0.000395 | | | /usr/libexec/git/git prune --e
xpire never
10:08:31.768353 git.c:456 | d4 | main | cmd_name | | | | | prune (remote/fetch/maintenanc
e/gc/prune)
10:08:31.768473 progress.c:268 | d4 | main | region_enter | r0 | 0.000714 | | progress | label:Checking connectivity
10:08:31.768488 read-cache.c:2370 | d4 | main | region_enter | r0 | 0.000732 | | index | ..label:do_read_index ./index
10:08:31.768503 read-cache.c:2375 | d4 | main | region_leave | r0 | 0.000747 | 0.000015 | index | ..label:do_read_index ./index
10:09:26.402642 progress.c:328 | d4 | main | data | r0 | 54.634883 | 54.634169 | progress | ..total_objects:0
10:09:26.402710 progress.c:336 | d4 | main | region_leave | r0 | 54.634953 | 54.634239 | progress | label:Checking connectivity
10:09:26.578281 git.c:714 | d4 | main | exit | | 54.810499 | | | code:0
10:09:26.578331 trace2/tr2_tgt_perf.c:213 | d4 | main | atexit | | 54.810558 | | | code:0
10:09:26.705890 run-command.c:993 | d3 | main | child_exit | | 76.106345 | 54.939261 | | [ch3] pid:12022 code:0
We see that it takes 54 until git prune
prints "total objects: 0". No insight why git gc
started git prune
in the first place.