From b9342b3fd6308c351f53075c9c4339913b73451f Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Fri, 5 Aug 2022 17:58:36 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- notes.c | 1 + 1 file changed, 1 insertion(+) (limited to 'notes.c') diff --git a/notes.c b/notes.c index 7452e71cc8..7bade6d8f6 100644 --- a/notes.c +++ b/notes.c @@ -1005,6 +1005,7 @@ void init_notes(struct notes_tree *t, const char *notes_ref, if (!notes_ref) notes_ref = default_notes_ref(); + update_ref_namespace(NAMESPACE_NOTES, xstrdup(notes_ref)); if (!combine_notes) combine_notes = combine_notes_concatenate; -- cgit v1.2.3