Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

worktree: Remove and Move methods #395

Merged
merged 1 commit into from
May 21, 2017
Merged

worktree: Remove and Move methods #395

merged 1 commit into from
May 21, 2017

Conversation

mcuadros
Copy link
Contributor

@@ -72,6 +74,8 @@ func (w *Worktree) status(commit plumbing.Hash) (Status, error) {
fs.Staging = Unmodified
}

fmt.Println(ch, a)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover?

if err != nil {
return err
}

fillSystemInfo(e, info.Sys())
return nil
}

func (w *Worktree) Remove(path string) (plumbing.Hash, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document this method.

return err
}

func (w *Worktree) Move(from, to string) (plumbing.Hash, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document this method.

@@ -20,3 +20,20 @@ func (s *IndexSuite) TestIndexEntry(c *C) {
c.Assert(e, IsNil)
c.Assert(err, Equals, ErrEntryNotFound)
}

func (s *IndexSuite) TestIndexRemove(c *C) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestIndexRemoveNonexistentEntry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already tested

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I didn't know, because the codecov comment is not appearing...

@@ -590,3 +590,68 @@ func (s *WorktreeSuite) TestAddUnmodified(c *C) {
c.Assert(hash.String(), Equals, "c192bd6a24ea1ab01d78686e417c8bdc7c3d197f")
c.Assert(err, IsNil)
}

func (s *WorktreeSuite) TestRemove(c *C) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestRemoveNonexistentElement?

worktree_test.go Outdated
c.Assert(status.File("LICENSE").Staging, Equals, Deleted)
}

func (s *WorktreeSuite) TestRemoveDeletedFromWorktree(c *C) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestRemoveNonexistentDeletedElement?

@codecov
Copy link

codecov bot commented May 21, 2017

Codecov Report

Merging #395 into master will decrease coverage by 0.67%.
The diff coverage is 61.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   77.29%   76.62%   -0.68%     
==========================================
  Files         123      123              
  Lines        8753     8787      +34     
==========================================
- Hits         6766     6733      -33     
- Misses       1226     1302      +76     
+ Partials      761      752       -9
Impacted Files Coverage Δ
worktree_status.go 65.9% <57.14%> (-1.66%) ⬇️
plumbing/format/index/index.go 40% <83.33%> (+13.68%) ⬆️
plumbing/transport/ssh/common.go 0% <0%> (-50.91%) ⬇️
plumbing/transport/ssh/auth_method.go 32.4% <0%> (-24.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f2abe7...52add52. Read the comment docs.

@mcuadros mcuadros dismissed stale reviews from ajnavarro and alcortesm May 21, 2017 11:01

changes made

@mcuadros mcuadros merged commit d98ebb5 into src-d:master May 21, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants