]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs/packed-backend.c
Merge branch 'ab/refs-errno-cleanup'
[thirdparty/git.git] / refs / packed-backend.c
index 1c5211b03e48cf23fd3a4d02e8aa6278b24ce26f..9da932a5400d400fac777ebb991c596623ef8395 100644 (file)
@@ -1354,6 +1354,7 @@ int is_packed_transaction_needed(struct ref_store *ref_store,
        ret = 0;
        for (i = 0; i < transaction->nr; i++) {
                struct ref_update *update = transaction->updates[i];
+               int failure_errno;
                unsigned int type;
                struct object_id oid;
 
@@ -1364,9 +1365,9 @@ int is_packed_transaction_needed(struct ref_store *ref_store,
                         */
                        continue;
 
-               if (!refs_read_raw_ref(ref_store, update->refname,
-                                      &oid, &referent, &type) ||
-                   errno != ENOENT) {
+               if (!refs_read_raw_ref(ref_store, update->refname, &oid,
+                                      &referent, &type, &failure_errno) ||
+                   failure_errno != ENOENT) {
                        /*
                         * We have to actually delete that reference
                         * -> this transaction is needed.