Skip to content

Commit

Permalink
DOCS fix commit-ish typo (#426)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Clegg <m@cle.gg>
  • Loading branch information
mattclegg committed Jun 28, 2024
1 parent a31e38a commit d83b45b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/releaser/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d83b45b

Please sign in to comment.