@@ -88,8 +88,9 @@ func (s *WorktreeSuite) TestPullFastForward(c *C) {
8888
8989w ,err := server .Worktree ()
9090c .Assert (err ,IsNil )
91- err = os .WriteFile (filepath .Join (path ,"foo" ), []byte ("foo" ),0755 )
91+ err = os .WriteFile (filepath .Join (url ,"foo" ), []byte ("foo" ),0755 )
9292c .Assert (err ,IsNil )
93+ w .Add ("foo" )
9394hash ,err := w .Commit ("foo" ,& CommitOptions {Author :defaultSignature ()})
9495c .Assert (err ,IsNil )
9596
@@ -125,15 +126,17 @@ func (s *WorktreeSuite) TestPullNonFastForward(c *C) {
125126
126127w ,err := server .Worktree ()
127128c .Assert (err ,IsNil )
128- err = os .WriteFile (filepath .Join (path ,"foo" ), []byte ("foo" ),0755 )
129+ err = os .WriteFile (filepath .Join (url ,"foo" ), []byte ("foo" ),0755 )
129130c .Assert (err ,IsNil )
131+ w .Add ("foo" )
130132_ ,err = w .Commit ("foo" ,& CommitOptions {Author :defaultSignature ()})
131133c .Assert (err ,IsNil )
132134
133135w ,err = r .Worktree ()
134136c .Assert (err ,IsNil )
135- err = os .WriteFile (filepath .Join (path ,"bar" ), []byte ("bar" ),0755 )
137+ err = os .WriteFile (filepath .Join (dir ,"bar" ), []byte ("bar" ),0755 )
136138c .Assert (err ,IsNil )
139+ w .Add ("bar" )
137140_ ,err = w .Commit ("bar" ,& CommitOptions {Author :defaultSignature ()})
138141c .Assert (err ,IsNil )
139142
@@ -286,16 +289,18 @@ func (s *RepositorySuite) TestPullAdd(c *C) {
286289func (s * WorktreeSuite )TestPullAlreadyUptodate (c * C ) {
287290path := fixtures .Basic ().ByTag ("worktree" ).One ().Worktree ().Root ()
288291
289- r ,err := Clone (memory .NewStorage (),memfs .New (),& CloneOptions {
292+ fs := memfs .New ()
293+ r ,err := Clone (memory .NewStorage (),fs ,& CloneOptions {
290294URL :filepath .Join (path ,".git" ),
291295})
292296
293297c .Assert (err ,IsNil )
294298
295299w ,err := r .Worktree ()
296300c .Assert (err ,IsNil )
297- err = os .WriteFile (filepath . Join ( path ,"bar" ) , []byte ("bar" ),0755 )
301+ util .WriteFile (fs ,"bar" , []byte ("bar" ),0755 )
298302c .Assert (err ,IsNil )
303+ w .Add ("bar" )
299304_ ,err = w .Commit ("bar" ,& CommitOptions {Author :defaultSignature ()})
300305c .Assert (err ,IsNil )
301306