aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 712695a..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{