Skip to content

Commit

Permalink
Enhancement: show diff stat when show_commit_diff is "full".
Browse files Browse the repository at this point in the history
Additionally, `show_commit_diff` should be compared to `false` instead of "false"
  • Loading branch information
randy3k committed Dec 7, 2017
1 parent 9bc0743 commit 7ea25e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/commands/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ def run(self, edit):
show_commit_diff = savvy_settings.get("show_commit_diff")
git_args = [
"diff",
"--patch",
"--no-color"
]

if show_commit_diff == "stat":
if show_commit_diff:
git_args.append("--stat")

if not include_unstaged:
Expand All @@ -127,7 +128,7 @@ def run(self, edit):
elif include_unstaged:
git_args.append("HEAD")

initial_text += self.git(*git_args) if show_commit_diff != 'false' else ''
initial_text += self.git(*git_args) if show_commit_diff else ''
self.view.run_command("gs_replace_view_text", {
"text": initial_text,
"nuke_cursors": True
Expand Down

0 comments on commit 7ea25e6

Please sign in to comment.