from git import Repo
repo = Repo('my-git-repo-path')
commit_msg = repo.git.log('some-file-path')
I measure the time spent and it seems that it may take up to 0.3s to get a commit message of some file. I am wondering how the function log() is implemented and how to modify my code to make it faster.
So much thanks if someone can help!