diff --git a/pkg/git/git.go b/pkg/git/git.go index f5260b26..39212189 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -23,13 +23,13 @@ import ( type Git struct{} -// AddWorktree creates a new Git worktree with a detached HEAD for the given committish and returns its path. -func (g *Git) AddWorktree(workingDir string, committish string) (string, error) { +// AddWorktree creates a new Git worktree with a detached HEAD for the given commit-ish and returns its path. +func (g *Git) AddWorktree(workingDir string, commitIsh string) (string, error) { dir, err := os.MkdirTemp("", "chart-releaser-") if err != nil { return "", err } - command := exec.Command("git", "worktree", "add", "--detach", dir, committish) + command := exec.Command("git", "worktree", "add", "--detach", dir, commitIsh) if err := runCommand(workingDir, command); err != nil { return "", err diff --git a/pkg/releaser/releaser.go b/pkg/releaser/releaser.go index 240f9a2a..439ae818 100644 --- a/pkg/releaser/releaser.go +++ b/pkg/releaser/releaser.go @@ -53,7 +53,7 @@ type GitHub interface { } type Git interface { - AddWorktree(workingDir string, committish string) (string, error) + AddWorktree(workingDir string, commitIsh string) (string, error) RemoveWorktree(workingDir string, path string) error Add(workingDir string, args ...string) error Commit(workingDir string, message string) error