Repository: iterative/dvc

Issue:
Doing `commit` after `move`
Hi, after using `dvc move` to move versioned data files, when doing `dvc status` one gets `changed checksum` so these files need to be `dvc commit`. I suggest combining `move+commit` because this is obviously what we want to do. 

Discussion:

Patch:
diff --git a/dvc/repo/move.py b/dvc/repo/move.py
index ea190fe61..6cd8b915c 100644
--- a/dvc/repo/move.py
+++ b/dvc/repo/move.py
@@ -65,5 +65,6 @@ def move(self, from_path, to_path):
 
     with self.state:
         out.move(to_out)
+        stage.save()
 
     stage.dump()


Test patch:
diff --git a/tests/func/test_move.py b/tests/func/test_move.py
index 1d2973f99..3004c7b29 100644
--- a/tests/func/test_move.py
+++ b/tests/func/test_move.py
@@ -192,3 +192,11 @@ class TestMoveFileInsideDirectory(TestDvc):
         dvc_fullpath = os.path.join(self.DATA_DIR, "data.txt.dvc")
         self.assertTrue(os.path.exists(data_fullpath))
         self.assertTrue(os.path.exists(dvc_fullpath))
+
+
+def test_move_should_save_stage_info(dvc_repo, repo_dir):
+    dvc_repo.add(repo_dir.DATA_DIR)
+
+    dvc_repo.move(repo_dir.DATA_DIR, "new_name")
+
+    assert dvc_repo.status() == {}