'How to find the newly added files in Git repo using pydriller
I am able to find out the files which have been modified in the Git repo but this piece of code is not returning the files which have been newly added, can anyone please help me to update the code so that the newly added files can be identified.
from pydriller import Repository
for commit in Repository('path/to/the/repo').traverse_commits():
for m in commit.modified_files:
print("Modified file {}".format(m.filename))
For example, Between commit1 and commit5 there are 3 files modified and 2 newly added
M changelog1.txt
M newfile2.txt
M changelog3.txt
A changelog4.txt
A newfile5.txt
With the code above it's returning all the files which have been modified, but not the ones which have been added.
PS: I am also open to any other solution
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
