aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/worktree_test.go b/worktree_test.go
index c69c617..180bfb0 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -299,6 +299,20 @@ func (s *WorktreeSuite) TestPullAlreadyUptodate(c *C) {
c.Assert(err, Equals, NoErrAlreadyUpToDate)
}
+func (s *WorktreeSuite) TestPullDepth(c *C) {
+ r, err := Clone(memory.NewStorage(), memfs.New(), &CloneOptions{
+ URL: fixtures.Basic().One().URL,
+ Depth: 1,
+ })
+
+ c.Assert(err, IsNil)
+
+ w, err := r.Worktree()
+ c.Assert(err, IsNil)
+ err = w.Pull(&PullOptions{})
+ c.Assert(err, Equals, nil)
+}
+
func (s *WorktreeSuite) TestCheckout(c *C) {
fs := memfs.New()
w := &Worktree{
@@ -903,7 +917,7 @@ func (s *WorktreeSuite) TestStatusCheckedInBeforeIgnored(c *C) {
c.Assert(status.IsClean(), Equals, true)
c.Assert(status, NotNil)
- err = util.WriteFile(fs, "secondIgnoredFile", []byte("Should be completly ignored"), 0755)
+ err = util.WriteFile(fs, "secondIgnoredFile", []byte("Should be completely ignored"), 0755)
c.Assert(err, IsNil)
status = nil
status, err = w.Status()