| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fa93137 commit d66edad
20 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,7 +100,7 @@ | |||
| 100 | 100 | ||
| 101 | 101 | ||
| 102 | 102 | def handle_process_output( | |
| 103 | - process: "Git.AutoInterrupt" | Popen, | ||
| 103 | + process: Union["Git.AutoInterrupt", Popen], | ||
| 104 | 104 | stdout_handler: Union[ | |
| 105 | 105 | None, | |
| 106 | 106 | Callable[[AnyStr], None], | |
@@ -395,9 +395,7 @@ def wait(self, stderr: Union[None, str, bytes] = b"") -> int: | |||
| 395 | 395 | :raise git.exc.GitCommandError: | |
| 396 | 396 | If the return status is not 0. | |
| 397 | 397 | """ | |
| 398 | - if stderr is None: | ||
| 399 | - stderr_b = b"" | ||
| 400 | - stderr_b = force_bytes(data=stderr, encoding="utf-8") | ||
| 398 | + stderr_b = force_bytes(data=stderr, encoding="utf-8") or b"" | ||
| 401 | 399 | status: Union[int, None] | |
| 402 | 400 | if self.proc is not None: | |
| 403 | 401 | status = self.proc.wait() | |
@@ -1180,52 +1178,112 @@ def version_info(self) -> Tuple[int, ...]: | |||
| 1180 | 1178 | def execute( | |
| 1181 | 1179 | self, | |
| 1182 | 1180 | command: Union[str, Sequence[Any]], | |
| 1181 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1183 | 1182 | *, | |
| 1184 | 1183 | as_process: Literal[True], | |
| 1184 | + **subprocess_kwargs: Any, | ||
| 1185 | 1185 | ) -> "AutoInterrupt": ... | |
| 1186 | 1186 | ||
| 1187 | 1187 | @overload | |
| 1188 | 1188 | def execute( | |
| 1189 | 1189 | self, | |
| 1190 | 1190 | command: Union[str, Sequence[Any]], | |
| 1191 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1191 | 1192 | *, | |
| 1192 | 1193 | as_process: Literal[False] = False, | |
| 1193 | - stdout_as_string: Literal[True], | ||
| 1194 | - ) -> Union[str, Tuple[int, str, str]]: ... | ||
| 1194 | + with_extended_output: Literal[False] = False, | ||
| 1195 | + stdout_as_string: Literal[True] = True, | ||
| 1196 | + with_stdout: Literal[True] = True, | ||
| 1197 | + **subprocess_kwargs: Any, | ||
| 1198 | + ) -> str: ... | ||
| 1195 | 1199 | ||
| 1196 | 1200 | @overload | |
| 1197 | 1201 | def execute( | |
| 1198 | 1202 | self, | |
| 1199 | 1203 | command: Union[str, Sequence[Any]], | |
| 1204 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1200 | 1205 | *, | |
| 1201 | 1206 | as_process: Literal[False] = False, | |
| 1202 | - stdout_as_string: Literal[False] = False, | ||
| 1203 | - ) -> Union[bytes, Tuple[int, bytes, str]]: ... | ||
| 1207 | + with_extended_output: Literal[False] = False, | ||
| 1208 | + stdout_as_string: Literal[False], | ||
| 1209 | + universal_newlines: Literal[False] = False, | ||
| 1210 | + with_stdout: Literal[True] = True, | ||
| 1211 | + **subprocess_kwargs: Any, | ||
| 1212 | + ) -> bytes: ... | ||
| 1204 | 1213 | ||
| 1205 | 1214 | @overload | |
| 1206 | 1215 | def execute( | |
| 1207 | 1216 | self, | |
| 1208 | 1217 | command: Union[str, Sequence[Any]], | |
| 1218 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1209 | 1219 | *, | |
| 1210 | - with_extended_output: Literal[False], | ||
| 1211 | - as_process: Literal[False], | ||
| 1212 | - stdout_as_string: Literal[True], | ||
| 1213 | - ) -> str: ... | ||
| 1220 | + as_process: Literal[False] = False, | ||
| 1221 | + with_extended_output: Literal[True], | ||
| 1222 | + stdout_as_string: Literal[True] = True, | ||
| 1223 | + with_stdout: Literal[True] = True, | ||
| 1224 | + **subprocess_kwargs: Any, | ||
| 1225 | + ) -> Tuple[int, str, str]: ... | ||
| 1214 | 1226 | ||
| 1215 | 1227 | @overload | |
| 1216 | 1228 | def execute( | |
| 1217 | 1229 | self, | |
| 1218 | 1230 | command: Union[str, Sequence[Any]], | |
| 1231 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1219 | 1232 | *, | |
| 1220 | - with_extended_output: Literal[False], | ||
| 1221 | - as_process: Literal[False], | ||
| 1233 | + as_process: Literal[False] = False, | ||
| 1234 | + with_extended_output: Literal[True], | ||
| 1222 | 1235 | stdout_as_string: Literal[False], | |
| 1223 | - ) -> bytes: ... | ||
| 1236 | + universal_newlines: Literal[False] = False, | ||
| 1237 | + with_stdout: Literal[True] = True, | ||
| 1238 | + **subprocess_kwargs: Any, | ||
| 1239 | + ) -> Tuple[int, bytes, str]: ... | ||
| 1240 | + | ||
| 1241 | + @overload | ||
| 1242 | + def execute( | ||
| 1243 | + self, | ||
| 1244 | + command: Union[str, Sequence[Any]], | ||
| 1245 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1246 | + *, | ||
| 1247 | + as_process: Literal[False] = False, | ||
| 1248 | + with_extended_output: Literal[True], | ||
| 1249 | + **subprocess_kwargs: Any, | ||
| 1250 | + ) -> Tuple[int, Union[str, bytes, None], str]: ... | ||
| 1251 | + | ||
| 1252 | + @overload | ||
| 1253 | + def execute( | ||
| 1254 | + self, | ||
| 1255 | + command: Union[str, Sequence[Any]], | ||
| 1256 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1257 | + *, | ||
| 1258 | + as_process: Literal[False] = False, | ||
| 1259 | + with_extended_output: Literal[False] = False, | ||
| 1260 | + **subprocess_kwargs: Any, | ||
| 1261 | + ) -> Union[str, bytes, None]: ... | ||
| 1262 | + | ||
| 1263 | + @overload | ||
| 1264 | + def execute( | ||
| 1265 | + self, | ||
| 1266 | + command: Union[str, Sequence[Any]], | ||
| 1267 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1268 | + with_extended_output: bool = False, | ||
| 1269 | + with_exceptions: bool = True, | ||
| 1270 | + as_process: bool = False, | ||
| 1271 | + output_stream: Union[None, BinaryIO] = None, | ||
| 1272 | + stdout_as_string: bool = True, | ||
| 1273 | + kill_after_timeout: Union[None, float] = None, | ||
| 1274 | + with_stdout: bool = True, | ||
| 1275 | + universal_newlines: bool = False, | ||
| 1276 | + shell: Union[None, bool] = None, | ||
| 1277 | + env: Union[None, Mapping[str, str]] = None, | ||
| 1278 | + max_chunk_size: int = io.DEFAULT_BUFFER_SIZE, | ||
| 1279 | + strip_newline_in_stdout: bool = True, | ||
| 1280 | + **subprocess_kwargs: Any, | ||
| 1281 | + ) -> Union[None, str, bytes, Tuple[int, Union[str, bytes, None], str], AutoInterrupt]: ... | ||
| 1224 | 1282 | ||
| 1225 | 1283 | def execute( | |
| 1226 | 1284 | self, | |
| 1227 | 1285 | command: Union[str, Sequence[Any]], | |
| 1228 | - istream: Union[None, BinaryIO] = None, | ||
| 1286 | + istream: Union[None, int, BinaryIO] = None, | ||
| 1229 | 1287 | with_extended_output: bool = False, | |
| 1230 | 1288 | with_exceptions: bool = True, | |
| 1231 | 1289 | as_process: bool = False, | |
@@ -1239,7 +1297,7 @@ def execute( | |||
| 1239 | 1297 | max_chunk_size: int = io.DEFAULT_BUFFER_SIZE, | |
| 1240 | 1298 | strip_newline_in_stdout: bool = True, | |
| 1241 | 1299 | **subprocess_kwargs: Any, | |
| 1242 | - ) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], AutoInterrupt]: | ||
| 1300 | + ) -> Union[None, str, bytes, Tuple[int, Union[str, bytes, None], str], AutoInterrupt]: | ||
| 1243 | 1301 | R"""Handle executing the command, and consume and return the returned | |
| 1244 | 1302 | information (stdout). | |
| 1245 | 1303 | ||
@@ -1503,7 +1561,7 @@ def make_timeout_error() -> Union[str, bytes]: | |||
| 1503 | 1561 | err = f'Timeout: the command "{" ".join(redacted_command)}" did not complete in {timeout:g} secs.' | |
| 1504 | 1562 | return err if universal_newlines else err.encode(defenc) | |
| 1505 | 1563 | ||
| 1506 | - def communicate() -> Tuple[AnyStr, AnyStr]: | ||
| 1564 | + def communicate() -> Tuple[Union[str, bytes, None], Union[str, bytes, None]]: | ||
| 1507 | 1565 | assert watchdog is not None | |
| 1508 | 1566 | assert kill_check is not None | |
| 1509 | 1567 | watchdog.start() | |
@@ -1523,8 +1581,8 @@ def communicate() -> Tuple[AnyStr, AnyStr]: | |||
| 1523 | 1581 | ||
| 1524 | 1582 | # Wait for the process to return. | |
| 1525 | 1583 | status = 0 | |
| 1526 | - stdout_value: Union[str, bytes] = b"" | ||
| 1527 | - stderr_value: Union[str, bytes] = b"" | ||
| 1584 | + stdout_value: Union[str, bytes, None] = b"" | ||
| 1585 | + stderr_value: Union[str, bytes, None] = b"" | ||
| 1528 | 1586 | newline = "\n" if universal_newlines else b"\n" | |
| 1529 | 1587 | try: | |
| 1530 | 1588 | if output_stream is None: | |
@@ -1566,7 +1624,7 @@ def communicate() -> Tuple[AnyStr, AnyStr]: | |||
| 1566 | 1624 | if self.GIT_PYTHON_TRACE == "full": | |
| 1567 | 1625 | cmdstr = " ".join(redacted_command) | |
| 1568 | 1626 | ||
| 1569 | - def as_text(stdout_value: Union[bytes, str]) -> str: | ||
| 1627 | + def as_text(stdout_value: Union[bytes, str, None]) -> str: | ||
| 1570 | 1628 | return not output_stream and safe_decode(stdout_value) or "<OUTPUT_STREAM>" | |
| 1571 | 1629 | ||
| 1572 | 1630 | # END as_text | |
@@ -1591,6 +1649,8 @@ def as_text(stdout_value: Union[bytes, str]) -> str: | |||
| 1591 | 1649 | if isinstance(stdout_value, bytes) and stdout_as_string: # Could also be output_stream. | |
| 1592 | 1650 | stdout_value = safe_decode(stdout_value) | |
| 1593 | 1651 | ||
| 1652 | + # stderr is always captured through PIPE. | ||
| 1653 | + assert stderr_value is not None | ||
| 1594 | 1654 | # Allow access to the command's status code. | |
| 1595 | 1655 | if with_extended_output: | |
| 1596 | 1656 | return (status, stdout_value, safe_decode(stderr_value)) | |
@@ -1829,7 +1889,7 @@ def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]: | |||
| 1829 | 1889 | raise ValueError("Failed to parse header: %r" % header_line) | |
| 1830 | 1890 | return (tokens[0], tokens[1], int(tokens[2])) | |
| 1831 | 1891 | ||
| 1832 | - def _prepare_ref(self, ref: AnyStr) -> bytes: | ||
| 1892 | + def _prepare_ref(self, ref: object) -> bytes: | ||
| 1833 | 1893 | # Required for command to separate refs on stdin, as bytes. | |
| 1834 | 1894 | if isinstance(ref, bytes): | |
| 1835 | 1895 | # Assume 40 bytes hexsha - bin-to-ascii for some reason returns bytes, not text. | |
@@ -1856,15 +1916,15 @@ def _get_persistent_cmd(self, attr_name: str, cmd_name: str, *args: Any, **kwarg | |||
| 1856 | 1916 | cmd = cast("Git.AutoInterrupt", cmd) | |
| 1857 | 1917 | return cmd | |
| 1858 | 1918 | ||
| 1859 | - def __get_object_header(self, cmd: "Git.AutoInterrupt", ref: AnyStr) -> Tuple[str, str, int]: | ||
| 1919 | + def __get_object_header(self, cmd: "Git.AutoInterrupt", ref: Union[str, bytes]) -> Tuple[str, str, int]: | ||
| 1860 | 1920 | if cmd.stdin and cmd.stdout: | |
| 1861 | 1921 | cmd.stdin.write(self._prepare_ref(ref)) | |
| 1862 | 1922 | cmd.stdin.flush() | |
| 1863 | 1923 | return self._parse_object_header(cmd.stdout.readline()) | |
| 1864 | 1924 | else: | |
| 1865 | 1925 | raise ValueError("cmd stdin was empty") | |
| 1866 | 1926 | ||
| 1867 | - def get_object_header(self, ref: str) -> Tuple[str, str, int]: | ||
| 1927 | + def get_object_header(self, ref: Union[str, bytes]) -> Tuple[str, str, int]: | ||
| 1868 | 1928 | """Use this method to quickly examine the type and size of the object behind the | |
| 1869 | 1929 | given ref. | |
| 1870 | 1930 | ||
@@ -1878,7 +1938,7 @@ def get_object_header(self, ref: str) -> Tuple[str, str, int]: | |||
| 1878 | 1938 | cmd = self._get_persistent_cmd("cat_file_header", "cat_file", batch_check=True) | |
| 1879 | 1939 | return self.__get_object_header(cmd, ref) | |
| 1880 | 1940 | ||
| 1881 | - def get_object_data(self, ref: str) -> Tuple[str, str, int, bytes]: | ||
| 1941 | + def get_object_data(self, ref: Union[str, bytes]) -> Tuple[str, str, int, bytes]: | ||
| 1882 | 1942 | """Similar to :meth:`get_object_header`, but returns object data as well. | |
| 1883 | 1943 | ||
| 1884 | 1944 | :return: | |
@@ -1892,7 +1952,7 @@ def get_object_data(self, ref: str) -> Tuple[str, str, int, bytes]: | |||
| 1892 | 1952 | del stream | |
| 1893 | 1953 | return (hexsha, typename, size, data) | |
| 1894 | 1954 | ||
| 1895 | - def stream_object_data(self, ref: str) -> Tuple[str, str, int, "Git.CatFileContentStream"]: | ||
| 1955 | + def stream_object_data(self, ref: Union[str, bytes]) -> Tuple[str, str, int, "Git.CatFileContentStream"]: | ||
| 1896 | 1956 | """Similar to :meth:`get_object_data`, but returns the data as a stream. | |
| 1897 | 1957 | ||
| 1898 | 1958 | :return: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1235,7 +1235,7 @@ def _read_commit_editmsg(self) -> str: | |||
| 1235 | 1235 | def _commit_editmsg_filepath(self) -> str: | |
| 1236 | 1236 | return osp.join(self.repo.common_dir, "COMMIT_EDITMSG") | |
| 1237 | 1237 | ||
| 1238 | - def _flush_stdin_and_wait(cls, proc: "Popen[bytes]", ignore_stdout: bool = False) -> bytes: | ||
| 1238 | + def _flush_stdin_and_wait(self, proc: "Popen[bytes]", ignore_stdout: bool = False) -> bytes: | ||
| 1239 | 1239 | stdin_IO = proc.stdin | |
| 1240 | 1240 | if stdin_IO: | |
| 1241 | 1241 | stdin_IO.flush() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ | |||
| 46 | 46 | from git.types import PathLike | |
| 47 | 47 | ||
| 48 | 48 | if TYPE_CHECKING: | |
| 49 | - from git.db import GitCmdObjectDB | ||
| 49 | + from gitdb.db.base import ObjectDBR, ObjectDBW | ||
| 50 | 50 | from git.objects.tree import TreeCacheTup | |
| 51 | 51 | ||
| 52 | 52 | from .base import IndexFile | |
@@ -412,7 +412,7 @@ def read_cache( | |||
| 412 | 412 | ||
| 413 | 413 | ||
| 414 | 414 | def write_tree_from_cache( | |
| 415 | - entries: List[IndexEntry], odb: "GitCmdObjectDB", sl: slice, si: int = 0 | ||
| 415 | + entries: List[IndexEntry], odb: "ObjectDBW", sl: slice, si: int = 0 | ||
| 416 | 416 | ) -> Tuple[bytes, List["TreeCacheTup"]]: | |
| 417 | 417 | R"""Create a tree from the given sorted list of entries and put the respective | |
| 418 | 418 | trees into the given object database. | |
@@ -484,7 +484,7 @@ def _tree_entry_to_baseindexentry(tree_entry: "TreeCacheTup", stage: int) -> Bas | |||
| 484 | 484 | return BaseIndexEntry((tree_entry[1], tree_entry[0], stage << CE_STAGESHIFT, tree_entry[2])) | |
| 485 | 485 | ||
| 486 | 486 | ||
| 487 | - def aggressive_tree_merge(odb: "GitCmdObjectDB", tree_shas: Sequence[bytes]) -> List[BaseIndexEntry]: | ||
| 487 | + def aggressive_tree_merge(odb: "ObjectDBR", tree_shas: Sequence[bytes]) -> List[BaseIndexEntry]: | ||
| 488 | 488 | R""" | |
| 489 | 489 | :return: | |
| 490 | 490 | List of :class:`~git.index.typ.BaseIndexEntry`\s representing the aggressive | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,19 +9,21 @@ | |||
| 9 | 9 | from pathlib import Path | |
| 10 | 10 | ||
| 11 | 11 | from git.objects import Blob | |
| 12 | + from git.objects.base import IndexObject | ||
| 12 | 13 | ||
| 13 | 14 | from .util import pack, unpack | |
| 14 | 15 | ||
| 15 | 16 | # typing ---------------------------------------------------------------------- | |
| 16 | 17 | ||
| 17 | - from typing import NamedTuple, Sequence, TYPE_CHECKING, Tuple, Union, cast | ||
| 18 | + from typing import NamedTuple, Sequence, TYPE_CHECKING, Tuple, Type, TypeVar, Union, cast | ||
| 18 | 19 | ||
| 19 | 20 | from git.types import PathLike | |
| 20 | 21 | ||
| 21 | 22 | if TYPE_CHECKING: | |
| 22 | 23 | from git.repo import Repo | |
| 23 | 24 | ||
| 24 | 25 | StageType = int | |
| 26 | + _T_IndexEntry = TypeVar("_T_IndexEntry", bound="BaseIndexEntry") | ||
| 25 | 27 | ||
| 26 | 28 | # --------------------------------------------------------------------------------- | |
| 27 | 29 | ||
@@ -104,15 +106,20 @@ class BaseIndexEntry(BaseIndexEntryHelper): | |||
| 104 | 106 | """ | |
| 105 | 107 | ||
| 106 | 108 | def __new__( | |
| 107 | - cls, | ||
| 109 | + cls: Type[_T_IndexEntry], | ||
| 108 | 110 | inp_tuple: Union[ | |
| 109 | 111 | Tuple[int, bytes, int, PathLike], | |
| 112 | + Tuple[int, bytes, int, PathLike, bytes, bytes, int, int, int, int, int], | ||
| 110 | 113 | Tuple[int, bytes, int, PathLike, bytes, bytes, int, int, int, int, int, int], | |
| 111 | 114 | ], | |
| 112 | - ) -> "BaseIndexEntry": | ||
| 115 | + ) -> _T_IndexEntry: | ||
| 113 | 116 | """Override ``__new__`` to allow construction from a tuple for backwards | |
| 114 | 117 | compatibility.""" | |
| 115 | - return super().__new__(cls, *inp_tuple) | ||
| 118 | + if len(inp_tuple) == 4: | ||
| 119 | + return BaseIndexEntryHelper.__new__(cls, *inp_tuple) | ||
| 120 | + if len(inp_tuple) == 11: | ||
| 121 | + return BaseIndexEntryHelper.__new__(cls, *inp_tuple) | ||
| 122 | + return BaseIndexEntryHelper.__new__(cls, *inp_tuple) | ||
| 116 | 123 | ||
| 117 | 124 | def __str__(self) -> str: | |
| 118 | 125 | return "%o %s %i\t%s" % (self.mode, self.hexsha, self.stage, self.path) | |
@@ -148,7 +155,7 @@ def intent_to_add(self) -> bool: | |||
| 148 | 155 | return (self.extended_flags & CE_EXT_INTENT_TO_ADD) > 0 | |
| 149 | 156 | ||
| 150 | 157 | @classmethod | |
| 151 | - def from_blob(cls, blob: Blob, stage: int = 0) -> "BaseIndexEntry": | ||
| 158 | + def from_blob(cls, blob: IndexObject, stage: int = 0) -> "BaseIndexEntry": | ||
| 152 | 159 | """:return: Fully equipped BaseIndexEntry at the given stage""" | |
| 153 | 160 | return cls((blob.mode, blob.binsha, stage << CE_STAGESHIFT, blob.path)) | |
| 154 | 161 | ||
@@ -192,10 +199,10 @@ def from_base(cls, base: "BaseIndexEntry") -> "IndexEntry": | |||
| 192 | 199 | Instance of type :class:`BaseIndexEntry`. | |
| 193 | 200 | """ | |
| 194 | 201 | time = pack(">LL", 0, 0) | |
| 195 | - return IndexEntry((base.mode, base.binsha, base.flags, base.path, time, time, 0, 0, 0, 0, 0)) # type: ignore[arg-type] | ||
| 202 | + return IndexEntry((base.mode, base.binsha, base.flags, base.path, time, time, 0, 0, 0, 0, 0)) | ||
| 196 | 203 | ||
| 197 | 204 | @classmethod | |
| 198 | - def from_blob(cls, blob: Blob, stage: int = 0) -> "IndexEntry": | ||
| 205 | + def from_blob(cls, blob: IndexObject, stage: int = 0) -> "IndexEntry": | ||
| 199 | 206 | """:return: Minimal entry resembling the given blob object""" | |
| 200 | 207 | time = pack(">LL", 0, 0) | |
| 201 | 208 | return IndexEntry( | |
@@ -211,5 +218,5 @@ def from_blob(cls, blob: Blob, stage: int = 0) -> "IndexEntry": | |||
| 211 | 218 | 0, | |
| 212 | 219 | 0, | |
| 213 | 220 | blob.size, | |
| 214 | - ) # type: ignore[arg-type] | ||
| 221 | + ) | ||
| 215 | 222 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | from typing import Any, TYPE_CHECKING, Union | |
| 20 | 20 | ||
| 21 | - from git.types import AnyGitObject, GitObjectTypeString, PathLike | ||
| 21 | + from git.types import AnyGitObject, GitObjectTypeString, PathLike, SupportsWrite | ||
| 22 | 22 | ||
| 23 | 23 | if TYPE_CHECKING: | |
| 24 | 24 | from gitdb.base import OStream | |
@@ -200,7 +200,7 @@ def data_stream(self) -> "OStream": | |||
| 200 | 200 | """ | |
| 201 | 201 | return self.repo.odb.stream(self.binsha) | |
| 202 | 202 | ||
| 203 | - def stream_data(self, ostream: "OStream") -> "Object": | ||
| 203 | + def stream_data(self, ostream: SupportsWrite[bytes]) -> "Object": | ||
| 204 | 204 | """Write our data directly to the given output stream. | |
| 205 | 205 | ||
| 206 | 206 | :param ostream: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -502,7 +502,7 @@ def _interpret_trailers( | |||
| 502 | 502 | ) -> str: | |
| 503 | 503 | message_bytes = message if isinstance(message, bytes) else message.encode(encoding, errors="strict") | |
| 504 | 504 | cmd = [repo.git.GIT_PYTHON_GIT_EXECUTABLE, "interpret-trailers", *trailer_args] | |
| 505 | - proc: Git.AutoInterrupt = repo.git.execute( # type: ignore[call-overload] | ||
| 505 | + proc: Git.AutoInterrupt = repo.git.execute( | ||
| 506 | 506 | cmd, | |
| 507 | 507 | as_process=True, | |
| 508 | 508 | istream=PIPE, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments