GitPython allows me to work on Git working copies. I'd like to use it. But how would I fetch the unique part, i.e. the "abbreviated ref ID", using GitPython?
So I am interested in what the --abbrev-commit
option to git log
gives me (e.g. in git log --abbrev-commit --pretty=oneline -n 1
).
How can I get that in GitPython - or will I have to implement this by enumerating through the ref IDs and figuring out the required length on my own?