refs/packet: add missing BUG() invocations to reflog callbacks
In e0cc8ac8202 (packed_ref_store: make class into a subclass of `ref_store`, 2017-06-23) a die() was added to packed_create_reflog(), but not to any of the other reflog callbacks, let's do that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jul 20, 2021 at 12:24 UTC
881aebffcffb32ffc99c681d9a1f8fb50e2cd9cb
1 file changed
+5
refs/packed-backend.c
+5
@@ -1600,6 +1600,7 @@ static int packed_for_each_reflog_ent(struct ref_store *ref_store,
1600
const char *refname,
1601
each_reflog_ent_fn fn, void *cb_data)
1602
{
1603
+ BUG("packed reference store does not support reflogs");
1604
return 0;
1605
}
1606
@@ -1608,12 +1609,14 @@ static int packed_for_each_reflog_ent_reverse(struct ref_store *ref_store,
1609
each_reflog_ent_fn fn,
1610
void *cb_data)
1611
{
1612
+ BUG("packed reference store does not support reflogs");
1613
return 0;
1614
}
1615
1616
static int packed_reflog_exists(struct ref_store *ref_store,
1617
const char *refname)
1618
{
1619
+ BUG("packed reference store does not support reflogs");
1620
return 0;
1621
}
1622
@@ -1627,6 +1630,7 @@ static int packed_create_reflog(struct ref_store *ref_store,
1630
static int packed_delete_reflog(struct ref_store *ref_store,
1631
const char *refname)
1632
{
1633
+ BUG("packed reference store does not support reflogs");
1634
return 0;
1635
}
1636
@@ -1638,6 +1642,7 @@ static int packed_reflog_expire(struct ref_store *ref_store,
1642
reflog_expiry_cleanup_fn cleanup_fn,
1643
void *policy_cb_data)
1644
{
1645
+ BUG("packed reference store does not support reflogs");
1646
return 0;
1647
}
1648