gitpython-developers/GitPython — Issue #47: Repo.blame don't return multi lines.
Author: niyaton
Created: 2012-02-15 13:28:27+00:00
State: open

According to API reference,
-------------------------
The blame information for the given file at the given revision.

Parm rev:	revision specifier, see git-rev-parse for viable options.
Returns:	list: [git.Commit, list: []] A list of tuples associating a Commit object with a list of lines that changed within the given commit. The Commit objects will be given in order of appearance.
-------------------------
blame method returns list of lines but I think the method always returns only one line.
The method pick up the first line of lines which were written in same commit (other lines are skipped and method don't return its information).

The behavior come from the lien 620 of git/repo/base.py.
The variable 'info' is initialized only when a line is first line of same commit.
But 'info' will be None after processing a line (the lien is not commit information).

We have to initialize 'info' to process subsequent lines.