Skip to content

Why does repo.git.log() spend so much time? #959

@Vergissmeinicht

Description

@Vergissmeinicht

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions