I am trying to write a basic script that is pulling replicating the contents of one directory into another one, but making some modifications along the way. The items written in the new directory are then committed to a git repo.
import git
repo = git.Repo("/path/to/repo")
repo.index.add(["list","of","files"])
commit = repo.index.commit=(message="foo Bar")
But when I navigate to that destination directory and run git status it shows that all the newly written files are untracked. I have previously pushed the commit generate in the method above to a remote successfully, but cannot figure out why the commit appears, for lack of a better way of saying, to have not been written to disk.
I have tried passing the message with and without an explicit argument assignment, as well as with and without author information.
I figured it out. The paths being added need to be relative to the CWD or else absolute. I had thought they were supposed to be relative to the root directory of the repository, since all of the paths of the blobs in the repository object are.