I need to have the Python script read in the files that have changed since the last Git commit. Using GitPython, how would I get the same output as running from cli:
$ git diff --name-only HEAD~1 HEAD
I can do something like the following, however, I only need the file names:
hcommit = repo.head.commit
for diff_added in hcommit.diff('HEAD~1').iter_change_type('A'):
print(diff_added)