Return the encoding of the files that hold the commit message. `commit_encoding` falls back to `encoding` when it is not set.
(self)
| 58 | self.backup_file_path = get_backup_file_path() |
| 59 | |
| 60 | def _get_commit_encoding(self) -> str: |
| 61 | """Return the encoding of the files that hold the commit message. |
| 62 | |
| 63 | `commit_encoding` falls back to `encoding` when it is not set. |
| 64 | """ |
| 65 | return ( |
| 66 | self.config.settings["commit_encoding"] or self.config.settings["encoding"] |
| 67 | ) |
| 68 | |
| 69 | def _read_backup_message(self) -> str | None: |
| 70 | # Check the commit backup file exists |
no outgoing calls
no test coverage detected