From: Christoph Weiss Date: Thu, 05 Nov 2026 06:41:26 GMT Subject: [BUG] Geometric maintenance prunes commits without updating commit-graph Message-ID: Hi, After updating our internal Forgejo instance from 16 to 17, many of our repositories' health checks started failing. This appears to be due to the update entailing a switch in Git from 2.52 to 2.54, which in turn changed the default maintenance strategy from `gc` to `geometric`. The following script hopefully reproduces the problem with `geometric`: #!/bin/sh set -eu unset GIT_DIR GIT_COMMON_DIR GIT_WORK_TREE GIT_INDEX_FILE GIT_CONFIG unset GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_CONFIG_COUNT GIT_CONFIG_PARAMETERS export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null repro_dir=$(mktemp -d) printf 'Repository: %s/repo.git\n' "$repro_dir" git --version git init --quiet --bare --template= --initial-branch=main "$repro_dir/repo.git" cd "$repro_dir/repo.git" git config user.name Reproducer git config user.email repro@example.invalid git config core.commitGraph true git config gc.writeCommitGraph true # Use `gc` here and no error occurs. git config maintenance.strategy geometric tree=$(git mktree /dev/null printf '\nBefore maintenance:\n' git fsck --full --no-dangling git maintenance run --auto --no-detach printf '\nAfter maintenance:\n' git fsck --full --no-dangling Best, Christoph