From 3d5635729407d494f372dd418a6e290f9eb7eda0 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 23 Sep 2024 09:42:16 +0200 Subject: [PATCH] Fix copying commit author to clipboard This was a regression introduced with the GitCommandBuilder in 25f8b0337. --- pkg/commands/git_commands/commit.go | 2 +- pkg/integration/tests/commit/copy_author_to_clipboard.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/commands/git_commands/commit.go b/pkg/commands/git_commands/commit.go index 45582c6bd..52a65fb6d 100644 --- a/pkg/commands/git_commands/commit.go +++ b/pkg/commands/git_commands/commit.go @@ -189,7 +189,7 @@ type Author struct { func (self *CommitCommands) GetCommitAuthor(commitHash string) (Author, error) { cmdArgs := NewGitCmd("show"). - Arg("--no-patch", "--pretty=format:'%an%x00%ae'", commitHash). + Arg("--no-patch", "--pretty=format:%an%x00%ae", commitHash). ToArgv() output, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput() diff --git a/pkg/integration/tests/commit/copy_author_to_clipboard.go b/pkg/integration/tests/commit/copy_author_to_clipboard.go index 6b9319f36..9e182265f 100644 --- a/pkg/integration/tests/commit/copy_author_to_clipboard.go +++ b/pkg/integration/tests/commit/copy_author_to_clipboard.go @@ -43,9 +43,6 @@ var CopyAuthorToClipboard = NewIntegrationTest(NewIntegrationTestArgs{ Contains("clipboard").IsSelected(), ) - /* EXPECTED: t.Views().Main().Content(Contains("/John Doe /")) - ACTUAL: */ - t.Views().Main().Content(Contains("/'John Doe /")) }, })