pythongitpython

GitPython list all files affected by a certain commit


I am using this for loop to loop through all commits:

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

How can I get a list with the files affected from this specific commit ?


Solution

  • Try it

    for commit in list(repo.iter_commits()):
        commit.stats.files