]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5318-commit-graph.sh
commit-graph: add repo arg to graph readers
authorJonathan Tan <jonathantanmy@google.com>
Wed, 11 Jul 2018 22:42:42 +0000 (15:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jul 2018 22:47:48 +0000 (15:47 -0700)
commitdade47c06cf849b0ca180a8e6383b55ea6f75812
tree9e7884a642dbf92f13b874457bf21464c383b9b2
parent8527750626f8a1b0fe641a5163760be054cc1d64
commit-graph: add repo arg to graph readers

Add a struct repository argument to the functions in commit-graph.h that
read the commit graph. (This commit does not affect functions that write
commit graphs.)

Because the commit graph functions can now read the commit graph of any
repository, the global variable core_commit_graph has been removed.
Instead, the config option core.commitGraph is now read on the first
time in a repository that a commit is attempted to be parsed using its
commit graph.

This commit includes a test that exercises the functionality on an
arbitrary repository that is not the_repository.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
Makefile
builtin/fsck.c
cache.h
commit-graph.c
commit-graph.h
commit.c
config.c
environment.c
ref-filter.c
t/helper/test-repository.c [new file with mode: 0644]
t/helper/test-tool.c
t/helper/test-tool.h
t/t5318-commit-graph.sh