GitPython list all files affected by a certain commit
<p>I am using this for loop to loop through all commits:</p>

<pre><code>repo = Repo("C:/Users/shiro/Desktop/lucene-solr/")
for commit in list(repo.iter_commits()):
    print commit.files_list  # how to do that ?
</code></pre>

<p>How can I get a list with the files affected from this specific commit ?</p>

<p>I solved this problem for SCM Workbench. The important file is:</p>

<p><a href="https://github.com/barry-scott/scm-workbench/blob/master/Source/Git/wb_git_project.py" rel="nofollow">https://github.com/barry-scott/scm-workbench/blob/master/Source/Git/wb_git_project.py</a></p>

<p>Look at cmdCommitLogForFile() and its helper __addCommitChangeInformation().</p>

<p>The trick is to diff the tree objects.</p>

python gitpython