Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2021-10-09 00:08:16 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-09 01:06:06 +0300
commit8788195c8846be949e6cd4bd19c8dc5e6371ffd3 (patch)
tree083f441572e55b2726e2bea2bad031ef317278a6 /refs/packed-backend.c
parent9bc45a28026eaea42011e8c1884aa2d9dc30f947 (diff)
refs: peeling non-the_repository iterators is BUG
There is currently no support for peeling the current ref of an iterator iterating over a non-the_repository ref store, and none is needed. Thus, for now, BUG() if that happens. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r--refs/packed-backend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 63f78bbaea..2161218719 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -886,6 +886,9 @@ static int packed_ref_iterator_peel(struct ref_iterator *ref_iterator,
struct packed_ref_iterator *iter =
(struct packed_ref_iterator *)ref_iterator;
+ if (iter->repo != the_repository)
+ BUG("peeling for non-the_repository is not supported");
+
if ((iter->base.flags & REF_KNOWS_PEELED)) {
oidcpy(peeled, &iter->peeled);
return is_null_oid(&iter->peeled) ? -1 : 0;