refs: add REFS_STORE_ALL_CAPS
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 24 Apr 2017 10:01:21 +0000 (17:01 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Apr 2017 04:28:55 +0000 (21:28 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/refs-internal.h
diff --git a/refs.c b/refs.c
index 96eba924754de02af489d2a104bf5fe0a1b04826..6e6f0ec5be1d81acc12c0b51675e7661d35478c9 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -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;
 }
 
index 690498698e41b75cf7a194ac03cafd778f0f19f1..b26f7e41ceca589b79d2d2cbc38087ff534cc24b 100644 (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