Skip to content

"blame" not working on binary files? AttributeError: 'NoneType' object has no attribute 'groups' git/repo/base.py", line 625, in blame #74

Description

@zbuc

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

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions