Skip to content

Commit a3c5643

Browse files
committed
Also use git show's --no-color flag in get_commit_message_subject
Just in case. See #51 for why it was already added to `get_commit_fulltext` previously.
1 parent ba973ac commit a3c5643

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ def get_blame_text(self, path, **kwargs):
3737
cli_args.extend(["--", os.path.basename(path)])
3838
return self.run_git(path, cli_args)
3939

40-
def get_commit_text(self, sha, path):
40+
def get_commit_fulltext(self, sha, path):
4141
cli_args = ["show", "--no-color", sha]
4242
return self.run_git(path, cli_args)
4343

44-
def get_commit_message_first_line(self, sha, path):
45-
cli_args = ["show", sha, "--pretty=format:%s", "--no-patch"]
44+
def get_commit_message_subject(self, sha, path):
45+
cli_args = ["show", "--no-color", sha, "--pretty=format:%s", "--no-patch"]
4646
return self.run_git(path, cli_args)
4747

4848
@classmethod
@@ -97,7 +97,7 @@ def handle_phantom_button(self, href):
9797
elif url.path == "show":
9898
sha = querystring["sha"][0]
9999
try:
100-
desc = self.get_commit_text(sha, self._view().file_name())
100+
desc = self.get_commit_fulltext(sha, self._view().file_name())
101101
except Exception as e:
102102
self.communicate_error(e)
103103
return

src/blame_inline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def show_inline_blame(self):
144144
# Uncommitted changes have only zeros in sha
145145
if blame["sha"] != "00000000":
146146
try:
147-
summary = self.get_commit_message_first_line(
147+
summary = self.get_commit_message_subject(
148148
blame["sha"], self.view.file_name()
149149
)
150150
except Exception:

0 commit comments

Comments
 (0)