ref_transaction_create(): disallow recursive pruning
[gitweb.git] / refs / files-backend.c
index c978fe49c918e2f8ace68fe112975c742cfd9838..35d37ce58beab5954751687c8517c4b9559ba432 100644 (file)
@@ -2087,7 +2087,7 @@ static void prune_ref(struct ref_to_prune *r)
        transaction = ref_transaction_begin(&err);
        if (!transaction ||
            ref_transaction_delete(transaction, r->name, r->sha1,
-                                  REF_ISPRUNING, NULL, &err) ||
+                                  REF_ISPRUNING | REF_NODEREF, NULL, &err) ||
            ref_transaction_commit(transaction, &err)) {
                ref_transaction_free(transaction);
                error("%s", err.buf);