Description
Hey,
I'm trying to verify a commit signature using git verify-commit <hash>
.
Running this command in my terminal in the repository folder works, and shows the expected result with gpg: Signature made <date>...
and so on.
Running the same command through simple-git like this (simplified):
import { simpleGit } from "simple-git";
const git: SimpleGit = simpleGit({
baseDir: "data/repository/"
});
git.init();
git.raw(["verify-commit", hash]).then(res => console.log(res))
...just returns nothing, as if the commit was not signed.
Doing it via callback (git.raw(["verify-commit", hash], (err, data) => { ...
) results in the same behavior.
Adding the verbose param (like this: git.raw(["verify-commit", "-v", hash]).then(res => console.log(res))
) returns a response, including the correct commit message, however the gpg part is missing again.
Do you have an idea how I can make simple-git behave as git does through my terminal?
Both simple-git and git on my system report the same version (2.44.0).