Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/repack-keep-pack'
[gitweb.git]
/
refs.c
diff --git
a/refs.c
b/refs.c
index 64aadd14c95274316fae2022741df91d2ec64c78..2e4a42f45963c5f8725b339cdab7b6a52e685e4d 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-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;
}