diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-23 07:38:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-23 07:38:09 +0200 |
commit | a2cec42213c55dd3ff9febb51612e3f1cab37b12 (patch) | |
tree | 1eb46a50269638c2163b156fd5b475ac6d95d750 /refs.c | |
parent | Merge branch 'hn/sort-ls-remote' (diff) | |
parent | get_main_ref_store: BUG() when outside a repository (diff) | |
download | git-a2cec42213c55dd3ff9febb51612e3f1cab37b12.tar.xz git-a2cec42213c55dd3ff9febb51612e3f1cab37b12.zip |
Merge branch 'sb/object-store-replace'
Hotfix.
* sb/object-store-replace:
get_main_ref_store: BUG() when outside a repository
object.c: clear replace map before freeing it
replace-object.c: remove the_repository from prepare_replace_object
object.c: free replace map in raw_object_store_clear
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1668,6 +1668,9 @@ struct ref_store *get_main_ref_store(struct repository *r) if (r->refs) return r->refs; + if (!r->gitdir) + BUG("attempting to get main_ref_store outside of repository"); + r->refs = ref_store_init(r->gitdir, REF_STORE_ALL_CAPS); return r->refs; } |