]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs/packed-backend.c
Merge branch 'jt/no-abuse-alternate-odb-for-submodules'
[thirdparty/git.git] / refs / packed-backend.c
index 216121871962e4eeccabc6030cc22f2fdb65c27f..1c5211b03e48cf23fd3a4d02e8aa6278b24ce26f 100644 (file)
@@ -726,9 +726,9 @@ static struct snapshot *get_snapshot(struct packed_ref_store *refs)
        return refs->snapshot;
 }
 
-static int packed_read_raw_ref(struct ref_store *ref_store,
-                              const char *refname, struct object_id *oid,
-                              struct strbuf *referent, unsigned int *type)
+static int packed_read_raw_ref(struct ref_store *ref_store, const char *refname,
+                              struct object_id *oid, struct strbuf *referent,
+                              unsigned int *type, int *failure_errno)
 {
        struct packed_ref_store *refs =
                packed_downcast(ref_store, REF_STORE_READ, "read_raw_ref");
@@ -741,7 +741,7 @@ static int packed_read_raw_ref(struct ref_store *ref_store,
 
        if (!rec) {
                /* refname is not a packed reference. */
-               errno = ENOENT;
+               *failure_errno = ENOENT;
                return -1;
        }
 
@@ -1607,6 +1607,7 @@ static int packed_for_each_reflog_ent(struct ref_store *ref_store,
                                      const char *refname,
                                      each_reflog_ent_fn fn, void *cb_data)
 {
+       BUG("packed reference store does not support reflogs");
        return 0;
 }
 
@@ -1615,12 +1616,14 @@ static int packed_for_each_reflog_ent_reverse(struct ref_store *ref_store,
                                              each_reflog_ent_fn fn,
                                              void *cb_data)
 {
+       BUG("packed reference store does not support reflogs");
        return 0;
 }
 
 static int packed_reflog_exists(struct ref_store *ref_store,
                               const char *refname)
 {
+       BUG("packed reference store does not support reflogs");
        return 0;
 }
 
@@ -1634,17 +1637,19 @@ static int packed_create_reflog(struct ref_store *ref_store,
 static int packed_delete_reflog(struct ref_store *ref_store,
                               const char *refname)
 {
+       BUG("packed reference store does not support reflogs");
        return 0;
 }
 
 static int packed_reflog_expire(struct ref_store *ref_store,
-                               const char *refname, const struct object_id *oid,
+                               const char *refname,
                                unsigned int flags,
                                reflog_expiry_prepare_fn prepare_fn,
                                reflog_expiry_should_prune_fn should_prune_fn,
                                reflog_expiry_cleanup_fn cleanup_fn,
                                void *policy_cb_data)
 {
+       BUG("packed reference store does not support reflogs");
        return 0;
 }