Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 428
dimitris93 Avatar asked Sep 26 '16 16:09

dimitris93


1 Answers

Try it

for commit in list(repo.iter_commits()):
    commit.stats.files
like image 152
Григорий Бернгардт Avatar answered Nov 18 '22 07:11

Григорий Бернгардт