]> git.ipfire.org Git - thirdparty/git.git/commit
repo-settings: introduce commitgraph.changedPathsVersion
authorTaylor Blau <me@ttaylorr.com>
Tue, 25 Jun 2024 17:39:50 +0000 (13:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Jun 2024 20:52:06 +0000 (13:52 -0700)
commitea0024deb9faa5474673a3db8f4f98812b48f44d
tree7e959f95f09c6b6e7f9e83ece613e4eacf59e3e6
parent08b6ae38c6024e05407fd1d1703d7e176102241b
repo-settings: introduce commitgraph.changedPathsVersion

A subsequent commit will introduce another version of the changed-path
filter in the commit graph file. In order to control which version to
write (and read), a config variable is needed.

Therefore, introduce this config variable. For forwards compatibility,
teach Git to not read commit graphs when the config variable
is set to an unsupported version. Because we teach Git this,
commitgraph.readChangedPaths is now redundant, so deprecate it and
define its behavior in terms of the config variable we introduce.

This commit does not change the behavior of writing (Git writes changed
path filters when explicitly instructed regardless of any config
variable), but a subsequent commit will restrict Git such that it will
only write when commitgraph.changedPathsVersion is a recognized value.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/commitgraph.txt
commit-graph.c
oss-fuzz/fuzz-commit-graph.c
repo-settings.c
repository.h