Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/git/hooks/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ func initGitRepo(t *testing.T) string {
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("git init: %v\n%s", err, out)
}
cmd = exec.Command("git", "-C", dir, "config", "commit.gpgsign", "false")
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("git config commit.gpgsign: %v\n%s", err, out)
}
return dir
}

Expand Down Expand Up @@ -115,7 +119,7 @@ func TestInstallWorktree(t *testing.T) {
mainDir := initGitRepo(t)

// Need at least one commit to create a worktree
cmd := exec.Command("git", "-C", mainDir, "commit", "--allow-empty", "-m", "init")
cmd := exec.Command("git", "-C", mainDir, "commit", "--allow-empty", "--no-gpg-sign", "-m", "init")
cmd.Env = append(os.Environ(), "GIT_AUTHOR_NAME=test", "GIT_AUTHOR_EMAIL=test@test.com",
"GIT_COMMITTER_NAME=test", "GIT_COMMITTER_EMAIL=test@test.com")
if out, err := cmd.CombinedOutput(); err != nil {
Expand Down