diff --git a/pkg/commands/git_commands/commit.go b/pkg/commands/git_commands/commit.go index f6002bbfd..811f2b22e 100644 --- a/pkg/commands/git_commands/commit.go +++ b/pkg/commands/git_commands/commit.go @@ -212,6 +212,7 @@ func (self *CommitCommands) ShowCmdObj(sha string, filterPath string, ignoreWhit Arg("--color="+self.UserConfig.Git.Paging.ColorArg). Arg(fmt.Sprintf("--unified=%d", contextSize)). Arg("--stat"). + Arg("--decorate"). Arg("-p"). Arg(sha). ArgIf(ignoreWhitespace, "--ignore-all-space"). diff --git a/pkg/commands/git_commands/commit_test.go b/pkg/commands/git_commands/commit_test.go index 7ce9b7a37..54d4cbbd1 100644 --- a/pkg/commands/git_commands/commit_test.go +++ b/pkg/commands/git_commands/commit_test.go @@ -212,28 +212,28 @@ func TestCommitShowCmdObj(t *testing.T) { filterPath: "", contextSize: 3, ignoreWhitespace: false, - expected: []string{"show", "--submodule", "--color=always", "--unified=3", "--stat", "-p", "1234567890"}, + expected: []string{"show", "--submodule", "--color=always", "--unified=3", "--stat", "--decorate", "-p", "1234567890"}, }, { testName: "Default case with filter path", filterPath: "file.txt", contextSize: 3, ignoreWhitespace: false, - expected: []string{"show", "--submodule", "--color=always", "--unified=3", "--stat", "-p", "1234567890", "--", "file.txt"}, + expected: []string{"show", "--submodule", "--color=always", "--unified=3", "--stat", "--decorate", "-p", "1234567890", "--", "file.txt"}, }, { testName: "Show diff with custom context size", filterPath: "", contextSize: 77, ignoreWhitespace: false, - expected: []string{"show", "--submodule", "--color=always", "--unified=77", "--stat", "-p", "1234567890"}, + expected: []string{"show", "--submodule", "--color=always", "--unified=77", "--stat", "--decorate", "-p", "1234567890"}, }, { testName: "Show diff, ignoring whitespace", filterPath: "", contextSize: 77, ignoreWhitespace: true, - expected: []string{"show", "--submodule", "--color=always", "--unified=77", "--stat", "-p", "1234567890", "--ignore-all-space"}, + expected: []string{"show", "--submodule", "--color=always", "--unified=77", "--stat", "--decorate", "-p", "1234567890", "--ignore-all-space"}, }, }