]> git.ipfire.org Git - thirdparty/git.git/commit - environment.c
refs: add array of ref namespaces
authorDerrick Stolee <derrickstolee@github.com>
Fri, 5 Aug 2022 17:58:36 +0000 (17:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Aug 2022 21:13:12 +0000 (14:13 -0700)
commitb9342b3fd6308c351f53075c9c4339913b73451f
treeef50c609adb612e0ddb04f3ef0e72bfd8f3490c2
parent5797b13919f8073108e58ab5cea39f4e6bbfa1c9
refs: add array of ref namespaces

Git interprets different meanings to different refs based on their
names. Some meanings are cosmetic, like how refs in  'refs/remotes/*'
are colored differently from refs in 'refs/heads/*'. Others are more
critical, such as how replace refs are interpreted.

Before making behavior changes based on ref namespaces, collect all
known ref namespaces into a array of ref_namespace_info structs. This
array is indexed by the new ref_namespace enum for quick access.

As of this change, this array is purely documentation. Future changes
will add dependencies on this array.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
notes.c
refs.c
refs.h