<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/gitpython.git/git/repo, branch 3.1.26</title>
<subtitle>github.com: gitpython-developers/GitPython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/'/>
<entry>
<title>Fix typing issues with delete_head and Remote.add</title>
<updated>2021-09-20T22:03:45+00:00</updated>
<author>
<name>Russ Allbery</name>
<email>eagle@eyrie.org</email>
</author>
<published>2021-09-20T20:53:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=5f4b4dbff46fae4c899f5573aea5a7266a41eeeb'/>
<id>5f4b4dbff46fae4c899f5573aea5a7266a41eeeb</id>
<content type='text'>
delete_head and Head.delete historically accept either Head objects
or a str name of a head.  Adjust the typing to match.  This
unfortunately requires suppressing type warnings in the signature of
RemoteReference.delete, since it inherits from Head but does not
accept str (since it needs access to the richer data of
RemoteReference).

Using assignment to make add an alias for create unfortunately
confuses mypy, since it loses track of the fact that it's a
classmethod and starts treating it like a staticmethod.  Replace
with a stub wrapper instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
delete_head and Head.delete historically accept either Head objects
or a str name of a head.  Adjust the typing to match.  This
unfortunately requires suppressing type warnings in the signature of
RemoteReference.delete, since it inherits from Head but does not
accept str (since it needs access to the richer data of
RemoteReference).

Using assignment to make add an alias for create unfortunately
confuses mypy, since it loses track of the fact that it's a
classmethod and starts treating it like a staticmethod.  Replace
with a stub wrapper instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the Git class type definition within Repo classmethods</title>
<updated>2021-08-18T01:10:38+00:00</updated>
<author>
<name>Michael Mulich</name>
<email>michael.mulich@gmail.com</email>
</author>
<published>2021-08-17T19:57:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=1207747121a79a0cd14426e595f5fe72ccc1d51a'/>
<id>1207747121a79a0cd14426e595f5fe72ccc1d51a</id>
<content type='text'>
Allow the GitCommandWrapperType definition to be used within the Repo
classmethods. This change follows the intended purpose as stated in
the code, "Subclasses may easily bring in their own custom types by
placing a constructor or type here."

The usecase that prompted this change has to do with
`GIT_SSH_COMMAND`. The goal is to setup a custom `Git` class with
knowledge of the value, something like as follows

```python
from git import Git as BaseGit, Repo as BaseRepo

class Git(BaseGit):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        # For example, assign the SSH command using the current flask
        # app's configured setting.
        self.update_environment(GIT_SSH_COMMAND=current_app.config['GIT_SSH_COMMAND'])

class Repo(BaseRepo):
    GitCommandWrapperType = _Git
```

With this change, the above example will allow the developer to use
`Repo.clone_from(...)` with the indended outcome. Otherwise the
developer will have two differing result when using `Repo(...)` vs
`Repo.clone_from(...)`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow the GitCommandWrapperType definition to be used within the Repo
classmethods. This change follows the intended purpose as stated in
the code, "Subclasses may easily bring in their own custom types by
placing a constructor or type here."

The usecase that prompted this change has to do with
`GIT_SSH_COMMAND`. The goal is to setup a custom `Git` class with
knowledge of the value, something like as follows

```python
from git import Git as BaseGit, Repo as BaseRepo

class Git(BaseGit):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        # For example, assign the SSH command using the current flask
        # app's configured setting.
        self.update_environment(GIT_SSH_COMMAND=current_app.config['GIT_SSH_COMMAND'])

class Repo(BaseRepo):
    GitCommandWrapperType = _Git
```

With this change, the above example will allow the developer to use
`Repo.clone_from(...)` with the indended outcome. Otherwise the
developer will have two differing result when using `Repo(...)` vs
`Repo.clone_from(...)`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve type of repo.currently_rebasing_on()</title>
<updated>2021-08-02T22:30:27+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T22:30:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=8b8aa16ee247c6ce403db7178d6c0f9c4ccd529c'/>
<id>8b8aa16ee247c6ce403db7178d6c0f9c4ccd529c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve type of repo.blame_incremental()</title>
<updated>2021-08-02T22:22:04+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T22:22:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=5aa8c3401a860974db0126dc030e74bbddf217eb'/>
<id>5aa8c3401a860974db0126dc030e74bbddf217eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Choose TypedDict!</title>
<updated>2021-08-02T22:04:43+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T22:04:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=ecb1f79cdb5198a10e099c2b7cd27aff69105ea9'/>
<id>ecb1f79cdb5198a10e099c2b7cd27aff69105ea9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test Dataclass in repo.base.blame() 6</title>
<updated>2021-08-02T21:54:31+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T21:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=ad417ba77c98a39c2d5b3b3a74eb0a1ca17f0ccc'/>
<id>ad417ba77c98a39c2d5b3b3a74eb0a1ca17f0ccc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test Dataclass in repo.base.blame() 5</title>
<updated>2021-08-02T21:52:10+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T21:52:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=bc9bcf51ef68385895d8cdbc76098d6b493cd1b6'/>
<id>bc9bcf51ef68385895d8cdbc76098d6b493cd1b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test Dataclass in repo.base.blame() 4</title>
<updated>2021-08-02T21:50:11+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T21:50:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=1aaa7048ddecb4509e1c279e28de5ef71477e71f'/>
<id>1aaa7048ddecb4509e1c279e28de5ef71477e71f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test TypedDict in repo.base.blame() 1</title>
<updated>2021-08-02T21:45:19+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T21:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=e4761ff67ef14df27026bbe9e215b9ddf5e5b3a5'/>
<id>e4761ff67ef14df27026bbe9e215b9ddf5e5b3a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test TypedDict in repo.base.blame() 2</title>
<updated>2021-08-02T21:35:03+00:00</updated>
<author>
<name>Yobmod</name>
<email>yobmod@gmail.com</email>
</author>
<published>2021-08-02T21:35:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/gitpython.git/commit/?id=ed137cbddf69ae11e5287a9e96e1df1a6e71250d'/>
<id>ed137cbddf69ae11e5287a9e96e1df1a6e71250d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
