]> git.ipfire.org Git - thirdparty/git.git/commit
refs: avoid include cycle with "repository.h"
authorPatrick Steinhardt <ps@pks.im>
Fri, 14 Jun 2024 06:50:28 +0000 (08:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jun 2024 17:26:33 +0000 (10:26 -0700)
commit36026a0f30692e341f934f58cd1f780432e9d58b
tree8c6ef539b62b4725e0d41b783f8d22065ba853d1
parente7da9385708accf518a80a1e17969020fb361048
refs: avoid include cycle with "repository.h"

There is an include cycle between "refs.h" and "repository.h" via
"commit.h", "object.h" and "hash.h". This has the effect that several
definitions of structs and enums will not be visible once we merge
"hash-ll.h" back into "hash.h" in the next commit.

The only reason that "repository.h" includes "refs.h" is the definition
of `enum ref_storage_format`. Move it into "repository.h" and have
"refs.h" include "repository.h" instead to fix the cycle.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.h
repository.h