models.main: Optimize stage_paths(), unstage_paths(), and revert_paths()
commit57f41902f544f06da37b9ddddf5ce3e8e8814e12
authorDavid Aguilar <davvid@gmail.com>
Wed, 7 Oct 2009 07:48:24 +0000 (7 00:48 -0700)
committerDavid Aguilar <davvid@gmail.com>
Wed, 7 Oct 2009 07:48:24 +0000 (7 00:48 -0700)
treef03f4a805b5eb62ce1074e77a8b5457533063136
parent36b8183822e7b01f732c96b9601a53dd1bcc7c20
models.main: Optimize stage_paths(), unstage_paths(), and revert_paths()

We can do less in each function since nothing is observing the
paths_staged/unstaged/reverted messages anymore.

stage_paths() now benefits from only ever running at most 2 git commands
to update the index - add for additions and add -u for removals.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/models/main.py
test/test_cola_models_classic.py