GitPython
GitPython copied to clipboard
GitPython is a python library used to interact with Git repositories.
Why `mypy` is failing when running this code: ```bash $ cat /tmp/test.py from git import Blob $ mypy /tmp/test.py /tmp/test.py:1: error: Module "git" has no attribute "Blob" Found 1 error...
When more than a single `include` is listed in the git configuration file, the parser only picks up the last one. Reproducer: gitconfig.example ``` [include] path = ~/.gitconfig.local [include] path...
When using the git.objects.submodules.base.Submodule.update method (https://gitpython.readthedocs.io/en/stable/reference.html#git.objects.submodule.base.Submodule.update), the git python module seems to fake a `git submodule` call with `git clone`. It executes ```git clone -n --separate-git-dir=/.git/modules/ -v /```. This command...
- added patch property to Commit class - added relevant test cases and tested it.
Current we can get status for the commit (comparing parent). But can't get patch text. I would like to have commit.patch to get patch text. Result will be similar to...
The docstring for [this commit method](https://github.com/gitpython-developers/GitPython/blob/851beabc93319d8dd05bff211b13d2b35ef097e0/git/index/base.py#L977) references `tree.commit` for documentation on the arguments, but that method doesn't appear to exist. What would be the correct reference, or should the documentation...
API documentation at https://gitpython.readthedocs.io/en/stable/reference.html#git.repo.base.Repo.git does not describe `repo.git`. What type of object is it? What are its function definitions? I'm looking at modifying code that uses `repo.git.describe()` (which I would...
I'm not sure this is a proper way to use `TagReferences`, but it's definitely unexpected. This time I'm using `GitPython` installed by pypi. I have this nice tag: ``` python...
Hi We use this code to check whether a git repo contains only "new" files or whether a file was modified: ``` def git_check_added_only(repo: Repo): prev_commit = repo.commit("HEAD~1") head_commit =...
When the filename being moved contains the string " to " this command fails with the assertion error "Too many tokens" Steps to reproduce. 1) Setup GitPython to point to...