You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When blaming, you will receive BlameEntry objects, which provide you with the Commit object via its .commit field. You should be able to obtain the message via blame_entry.commit.message.
Considering the existence of a suitable workaround, I believe it's ok to close this issue right away. However, if there is anything else, please feel free to comment and possibly get the ticket re-opened (maybe there is a problem I didn't see).
Here, I made some easy scripts to run to reproduce this. Run the first to set up the git env (in a new directory) and then run the second to see that only the first line of the commit message is displayed.
Thanks for the feedback ! It's clear to me now why this indeed doesn't work as expected.
The Commit object fooled me, and might do so with many others using this API.
The most straightforward solution seems to simply not fill in the summary, as the commit will then lazily fetch the data when queried.
Activity
Byron commentedon Jul 13, 2016
When blaming, you will receive
BlameEntryobjects, which provide you with theCommitobject via its.commitfield. You should be able to obtain the message viablame_entry.commit.message.Considering the existence of a suitable workaround, I believe it's ok to close this issue right away. However, if there is anything else, please feel free to comment and possibly get the ticket re-opened (maybe there is a problem I didn't see).
ajaska commentedon Jul 13, 2016
Yes, I am referring to those
.commitobjects.Here, I made some easy scripts to run to reproduce this. Run the first to set up the git env (in a new directory) and then run the second to see that only the first line of the commit message is displayed.
ajaska commentedon Jul 13, 2016
You can see here where
Commitobjects are being created with code that looks likemessage = summary:)GitPython/git/repo/base.py
Line 718 in 4896fa2
GitPython/git/repo/base.py
Line 819 in 4896fa2
Byron commentedon Jul 17, 2016
Thanks for the feedback ! It's clear to me now why this indeed doesn't work as expected.
The
Commitobject fooled me, and might do so with many others using this API.The most straightforward solution seems to simply not fill in the summary, as the commit will then lazily fetch the data when queried.
fix(blame): lazily fetch full commit message