import os

import morenines.status

from morenines.index import Index
from morenines.util import get_files


def update(root_path, index_file, remove_missing):
    index = Index.read(index_file)

    new_files, missing_files = morenines.status.status(root_path, index_file)

    index.add(new_files)

    if remove_missing is True:
        index.remove(missing_files)

    return index

@@ -8,33 +8,8 @@
 os%0A%0A
-import morenines.status%0A%0A
 from
@@ -74,16 +74,37 @@
 et_files
+, get_new_and_missing
 %0A%0A%0Adef u
@@ -220,31 +220,27 @@
 s = 
-morenines.status.status
+get_new_and_missing
 (roo
@@ -248,29 +248,24 @@
 _path, index
-_file
 )%0A%0A    index

Make update() call util fn for new and missing files