MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / _get_commit_encoding

Method _get_commit_encoding

commitizen/commands/commit.py:60–67  ·  view source on GitHub ↗

Return the encoding of the files that hold the commit message. `commit_encoding` falls back to `encoding` when it is not set.

(self)

Source from the content-addressed store, hash-verified

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

Callers 3

_read_backup_messageMethod · 0.95
manual_editMethod · 0.95
__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected