GitPython
GitPython copied to clipboard
GitPython is a python library used to interact with Git repositories.
set this doc: http://gitpython.readthedocs.io/en/stable/tutorial.html#handling-remotes ``` empty_repo = git.Repo.init(osp.join(rw_dir, 'empty')) origin = empty_repo.create_remote('origin', repo.remotes.origin.url) assert origin.exists() assert origin == empty_repo.remotes.origin == empty_repo.remotes['origin'] origin.fetch() # assure we actually have data. fetch() returns...
When I `git init --object-format=sha256` I receive ``` Traceback (most recent call last): ... File "/usr/local/lib/python3.9/site-packages/git/repo/fun.py", line 163, in name_to_object raise BadName(name) gitdb.exc.BadName: Ref 'HEAD' did not resolve to an...
Just happen to notice that in `GitPython == 3.1.27` the static typing pip [mypy](https://github.com/python/mypy) fails to recognize the `**kwargs` of `Remote.fetch()` in `remote.py`. This happens because the kwargs argument is...
It seems that I GitPython does not tell the caller that username/password are required by git. Did I miss something in the API to do this? Why does the call...
## Description Replaced `mktemp()` with safer `mkstemp()` to prevent Race Conditions
The documentation for `Remote.set_url` states that `new_url` is "add[ed] as an extra remote URL" unless `old_url` parameter is passed. However, the way it is currently written, the method actually replaces...
``` python Python 3.10.1 (main, Dec 12 2021, 12:17:52) [GCC 10.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import git >>> git.__version__ '3.1.27' >>> repo...
Hi, over here, https://github.com/gitpython-developers/GitPython/blob/main/git/repo/base.py#L1151 why is this `Union[TextIO, BinaryIO]` instead of `IO[bytes]`? As sending a temporaryfile or any file, is not in `Union[TextIO, BinaryIO]` and it is in `IO[bytes]`
GitPython is failing to retrieve commits from a specific repository I am currently analyzing: `https://github.com/jbrowncfa/Cryptobomb`. Exception's stack trace: ``` Traceback (most recent call last): File "", line 1, in File...
Having to perform bit operations on `flags` is very unintuitive. The command line git client fails when push fails.