aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--worktree.go6
-rw-r--r--worktree_status.go2
-rw-r--r--worktree_test.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/worktree.go b/worktree.go
index e2f8562..d2630b7 100644
--- a/worktree.go
+++ b/worktree.go
@@ -25,7 +25,7 @@ import (
var (
ErrWorktreeNotClean = errors.New("worktree is not clean")
ErrSubmoduleNotFound = errors.New("submodule not found")
- ErrUnstaggedChanges = errors.New("worktree contains unstagged changes")
+ ErrUnstagedChanges = errors.New("worktree contains unstaged changes")
)
// Worktree represents a git worktree.
@@ -152,7 +152,7 @@ func (w *Worktree) Checkout(opts *CheckoutOptions) error {
}
if unstaged {
- return ErrUnstaggedChanges
+ return ErrUnstagedChanges
}
}
@@ -269,7 +269,7 @@ func (w *Worktree) Reset(opts *ResetOptions) error {
}
if unstaged {
- return ErrUnstaggedChanges
+ return ErrUnstagedChanges
}
}
diff --git a/worktree_status.go b/worktree_status.go
index b2848f9..ac4be3a 100644
--- a/worktree_status.go
+++ b/worktree_status.go
@@ -243,7 +243,7 @@ func diffTreeIsEquals(a, b noder.Hasher) bool {
}
// Add adds the file contents of a file in the worktree to the index. if the
-// file is already stagged in the index no error is returned.
+// file is already staged in the index no error is returned.
func (w *Worktree) Add(path string) (plumbing.Hash, error) {
s, err := w.Status()
if err != nil {
diff --git a/worktree_test.go b/worktree_test.go
index 7d9c617..fb71873 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -813,7 +813,7 @@ func (s *WorktreeSuite) TestResetMerge(c *C) {
c.Assert(err, IsNil)
err = w.Reset(&ResetOptions{Mode: MergeReset, Commit: commitB})
- c.Assert(err, Equals, ErrUnstaggedChanges)
+ c.Assert(err, Equals, ErrUnstagedChanges)
branch, err = w.r.Reference(plumbing.Master, false)
c.Assert(err, IsNil)