refs: add REFS_STORE_ALL_CAPS

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2017-04-24 17:01:21 +07:00 committed by Junio C Hamano
parent 0c064d907b
commit 0d8a814d8a
2 changed files with 5 additions and 5 deletions

6
refs.c
View File

@ -1526,11 +1526,7 @@ struct ref_store *get_main_ref_store(void)
if (main_ref_store)
return main_ref_store;
main_ref_store = ref_store_init(get_git_dir(),
(REF_STORE_READ |
REF_STORE_WRITE |
REF_STORE_ODB |
REF_STORE_MAIN));
main_ref_store = ref_store_init(get_git_dir(), REF_STORE_ALL_CAPS);
return main_ref_store;
}

View File

@ -467,6 +467,10 @@ struct ref_store;
#define REF_STORE_WRITE (1 << 1) /* can perform update operations */
#define REF_STORE_ODB (1 << 2) /* has access to object database */
#define REF_STORE_MAIN (1 << 3)
#define REF_STORE_ALL_CAPS (REF_STORE_READ | \
REF_STORE_WRITE | \
REF_STORE_ODB | \
REF_STORE_MAIN)
/*
* Initialize the ref_store for the specified gitdir. These functions