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
{{ message }}
Repository navigation
"blame" not working on binary files? AttributeError: 'NoneType' object has no attribute 'groups' git/repo/base.py", line 625, in blame #74
When trying to run repo.blame('master', '/path/') against a binary file, I always receive an AttributeError
I hacked this patch that works for my needs
Line 624 of base.py:
m = self.re_tab_full_line.search(line)
blames[-1][0] = c
if m:
text, = m.groups()
blames[-1][1].append( text )
else:
blames[-1][1].append( "Could not get blame info!" )
Not sure what the correct fix is as I'm not familiar with your code
Activity
Byron commentedon Oct 12, 2012
Thanks for sharing this !
Apparently it tried to access the match even though that was None.
If you would like to donate your fix, please add a test to the existing ones that try to verify blame, and add a pull request.
Added test to verify binary diffs are working as well.
Byron commentedon Jan 9, 2015
Binary files in blames are now supported and tested for.
Additionally, I have added a test to verify that diffs with binary files work as well.
Added test to verify binary diffs are working as well.