I'm using GitPython to run several simple commands against repos. Essentially most of it is just:
repo = Repo(repo_dir)
repo.git.fetch()
result = repo.git.diff("origin", name_only=True)
repo.git.merge()
# ...
Is there some way to setup GitPython to output/log the commands that are run, and also display the raw output they produce?
For example, the above I would expect to be something along the lines of:
$ git fetch
$ git diff --name-only origin
path/to/differing_file
path/to/another/differing_file
$ git merge