diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-08-05 17:58:36 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-05 21:13:12 (GMT) |
commit | b9342b3fd6308c351f53075c9c4339913b73451f (patch) | |
tree | ef50c609adb612e0ddb04f3ef0e72bfd8f3490c2 /notes.c | |
parent | 5797b13919f8073108e58ab5cea39f4e6bbfa1c9 (diff) | |
download | git-b9342b3fd6308c351f53075c9c4339913b73451f.zip git-b9342b3fd6308c351f53075c9c4339913b73451f.tar.gz git-b9342b3fd6308c351f53075c9c4339913b73451f.tar.bz2 |
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>
Diffstat (limited to 'notes.c')
-rw-r--r-- | notes.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |