Skip to content

Commit 881aebf

Browse files
avargitster
authored andcommitted
refs/packet: add missing BUG() invocations to reflog callbacks
In e0cc8ac (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>
1 parent daab8a5 commit 881aebf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

refs/packed-backend.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static int packed_for_each_reflog_ent(struct ref_store *ref_store,
16001600
const char *refname,
16011601
each_reflog_ent_fn fn, void *cb_data)
16021602
{
1603+
BUG("packed reference store does not support reflogs");
16031604
return 0;
16041605
}
16051606

@@ -1608,12 +1609,14 @@ static int packed_for_each_reflog_ent_reverse(struct ref_store *ref_store,
16081609
each_reflog_ent_fn fn,
16091610
void *cb_data)
16101611
{
1612+
BUG("packed reference store does not support reflogs");
16111613
return 0;
16121614
}
16131615

16141616
static int packed_reflog_exists(struct ref_store *ref_store,
16151617
const char *refname)
16161618
{
1619+
BUG("packed reference store does not support reflogs");
16171620
return 0;
16181621
}
16191622

@@ -1627,6 +1630,7 @@ static int packed_create_reflog(struct ref_store *ref_store,
16271630
static int packed_delete_reflog(struct ref_store *ref_store,
16281631
const char *refname)
16291632
{
1633+
BUG("packed reference store does not support reflogs");
16301634
return 0;
16311635
}
16321636

@@ -1638,6 +1642,7 @@ static int packed_reflog_expire(struct ref_store *ref_store,
16381642
reflog_expiry_cleanup_fn cleanup_fn,
16391643
void *policy_cb_data)
16401644
{
1645+
BUG("packed reference store does not support reflogs");
16411646
return 0;
16421647
}
16431648

0 commit comments

Comments
 (0)