| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bd58716 commit 7cdf9c7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -450,7 +450,7 @@ def trailers_list(self) -> List[Tuple[str, str]]: | |||
| 450 | 450 | :return: | |
| 451 | 451 | List containing key-value tuples of whitespace stripped trailer information. | |
| 452 | 452 | """ | |
| 453 | - trailer = self._interpret_trailers(self.repo, self.message, ["--parse"], self.encoding).strip() | ||
| 453 | + trailer = self._interpret_trailers(self.repo, self.message, ["--parse"]).strip() | ||
| 454 | 454 | ||
| 455 | 455 | if not trailer: | |
| 456 | 456 | return [] | |
@@ -462,17 +462,17 @@ def trailers_list(self) -> List[Tuple[str, str]]: | |||
| 462 | 462 | ||
| 463 | 463 | return trailer_list | |
| 464 | 464 | ||
| 465 | - @staticmethod | ||
| 466 | - def _interpret_trailers(repo: "Repo", message: str, trailer_args: Sequence[str], encoding: str) -> str: | ||
| 465 | + @classmethod | ||
| 466 | + def _interpret_trailers(cls, repo: "Repo", message: str, trailer_args: Sequence[str]) -> str: | ||
| 467 | 467 | cmd = [repo.git.GIT_PYTHON_GIT_EXECUTABLE, "interpret-trailers", *trailer_args] | |
| 468 | 468 | proc: Git.AutoInterrupt = repo.git.execute( # type: ignore[call-overload] | |
| 469 | 469 | cmd, | |
| 470 | 470 | as_process=True, | |
| 471 | 471 | istream=PIPE, | |
| 472 | 472 | ) | |
| 473 | - stdout_bytes, _ = proc.communicate(message.encode(encoding, errors="strict")) | ||
| 473 | + stdout_bytes, _ = proc.communicate(message.encode(cls.default_encoding, errors="strict")) | ||
| 474 | 474 | finalize_process(proc) | |
| 475 | - return stdout_bytes.decode(encoding, errors="strict") | ||
| 475 | + return stdout_bytes.decode(cls.default_encoding, errors="strict") | ||
| 476 | 476 | ||
| 477 | 477 | @property | |
| 478 | 478 | def trailers_dict(self) -> Dict[str, List[str]]: | |
@@ -704,7 +704,7 @@ def create_from_tree( | |||
| 704 | 704 | trailer_args.append("--trailer") | |
| 705 | 705 | trailer_args.append(f"{key}: {val}") | |
| 706 | 706 | ||
| 707 | - message = cls._interpret_trailers(repo, str(message), trailer_args, conf_encoding) | ||
| 707 | + message = cls._interpret_trailers(repo, str(message), trailer_args) | ||
| 708 | 708 | # END apply trailers | |
| 709 | 709 | ||
| 710 | 710 | # CREATE NEW COMMIT | |
| Back | FazBrowse Home | New Git URL |
0 commit comments