]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.c
Merge branch 'jl/subtree-check-parents-argument-passing-fix'
[thirdparty/git.git] / commit.c
index 551de4903c1f4f5d21a4e30bc012109c593054c8..a348f085b2b853d2f14d6848f3ff57edf85601b8 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1212,8 +1212,10 @@ int check_commit_signature(const struct commit *commit, struct signature_check *
 
        if (parse_signed_commit(commit, &payload, &signature, the_hash_algo) <= 0)
                goto out;
-       ret = check_signature(payload.buf, payload.len, signature.buf,
-               signature.len, sigc);
+
+       sigc->payload_type = SIGNATURE_PAYLOAD_COMMIT;
+       sigc->payload = strbuf_detach(&payload, &sigc->payload_len);
+       ret = check_signature(sigc, signature.buf, signature.len);
 
  out:
        strbuf_release(&payload);