diff options
author | Paulo Gomes <paulo.gomes.uk@gmail.com> | 2024-06-28 22:59:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 22:59:35 +0000 |
commit | f1a27a297c706e934120f11df208209a4b1f510f (patch) | |
tree | 21f288ce9981099c600ba6dcc469461e9ca27f8d /worktree_test.go | |
parent | cc6b98e366436b69a0e91aa0698972d583080900 (diff) | |
download | go-git-f1a27a297c706e934120f11df208209a4b1f510f.tar.gz |
Revert "Add option approximating `git clean -x` flag."
Diffstat (limited to 'worktree_test.go')
-rw-r--r-- | worktree_test.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/worktree_test.go b/worktree_test.go index 5b0cc32..3e151f6 100644 --- a/worktree_test.go +++ b/worktree_test.go @@ -2371,45 +2371,6 @@ func (s *WorktreeSuite) TestClean(c *C) { c.Assert(err, ErrorMatches, ".*(no such file or directory.*|.*file does not exist)*.") } -func (s *WorktreeSuite) TestCleanAll(c *C) { - fs := fixtures.Basic().ByTag("worktree").One().Worktree() - r, err := PlainOpen(fs.Root()) - c.Assert(err, IsNil) - w, err := r.Worktree() - c.Assert(err, IsNil) - - err = util.WriteFile(w.Filesystem, ".gitignore", []byte("foo\n"), 0755) - c.Assert(err, IsNil) - - _, err = w.Add(".") - c.Assert(err, IsNil) - - commitOpts := &CommitOptions{Author: &object.Signature{Name: "foo", Email: "foo@foo.foo", When: time.Now()}} - _, err = w.Commit("Add gitignore", commitOpts) - c.Assert(err, IsNil) - - status, err := w.Status() - c.Assert(err, IsNil) - c.Assert(len(status), Equals, 0) - - err = util.WriteFile(w.Filesystem, "foo", []byte("foo\n"), 0755) - c.Assert(err, IsNil) - - status, err = w.Status() - c.Assert(err, IsNil) - c.Assert(len(status), Equals, 0) - - err = w.Clean(&CleanOptions{All: true, Dir: true}) - c.Assert(err, IsNil) - - status, err = w.Status() - c.Assert(err, IsNil) - c.Assert(len(status), Equals, 0) - - _, err = fs.Lstat("foo") - c.Assert(err, ErrorMatches, ".*(no such file or directory.*|.*file does not exist)*.") -} - func (s *WorktreeSuite) TestCleanBare(c *C) { storer := memory.NewStorage() |