(self, exc_type, exc_val, exc_tb)
| 183 | return self |
| 184 | |
| 185 | def __exit__(self, exc_type, exc_val, exc_tb) -> None: |
| 186 | self._check_thread() |
| 187 | # Only commit if no exception occurred |
| 188 | if exc_type is None and self._tx is not None: |
| 189 | self.commit() |
| 190 | |
| 191 | # Always free the transaction |
| 192 | if self._tx is not None: |
| 193 | C.git_transaction_free(self._tx) |
| 194 | self._tx = None |
| 195 | |
| 196 | def __del__(self) -> None: |
| 197 | if self._tx is not None: |
nothing calls this directly
no test coverage detected