Skip to content

Blame returns str not list #1008

Description

@ncopiy

Version 3.1.1

The docs says it will be list type of return value: https://gitpython.readthedocs.io/en/stable/reference.html?highlight=blame#git.repo.base.Repo.blame

But instead of it i've got a string:

In[2]: from git import Repo
In[3]: from django.conf import settings
In[4]: r = Repo(settings.BASE_DIR)
In[5]: bl = r.git.blame('HEAD', 'users/utils.py')
In[6]: type(bl)
Out[6]: str

Version is similar as in the docs.

(venv) a@a:~/Workspace/git_test$ pip freeze | grep Git
GitPython==3.1.1

Is that incorrect docs or bug in the library?

Activity

  1. Byron commented on Apr 25, 2020

    @Byron
    Member

    Instead of r.git.blame('HEAD', 'users/utils.py'), you could try r.blame('HEAD', 'users/utils.py').

    I hope this helps. Please feel free to continue posting in the closed issue.

  2. reopened this on Feb 26, 2021
  3. locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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