| 2350 | } |
| 2351 | |
| 2352 | struct ref_store *get_main_ref_store(struct repository *r) |
| 2353 | { |
| 2354 | if (r->refs_private) |
| 2355 | return r->refs_private; |
| 2356 | |
| 2357 | if (!r->gitdir) |
| 2358 | BUG("attempting to get main_ref_store outside of repository"); |
| 2359 | |
| 2360 | r->refs_private = ref_store_init(r, r->ref_storage_format, |
| 2361 | r->gitdir, REF_STORE_ALL_CAPS); |
| 2362 | r->refs_private = maybe_debug_wrap_ref_store(r->gitdir, r->refs_private); |
| 2363 | return r->refs_private; |
| 2364 | } |
| 2365 | |
| 2366 | /* |
| 2367 | * Associate a ref store with a name. It is a fatal error to call this |