diffparse: allow partial staging of deleted files
commit333e84e5cd09d3c8dcb46dac5452859929429fde
authorDavid Aguilar <davvid@gmail.com>
Fri, 30 Nov 2018 23:55:28 +0000 (30 15:55 -0800)
committerDavid Aguilar <davvid@gmail.com>
Sat, 1 Dec 2018 00:23:47 +0000 (30 16:23 -0800)
tree2ca13efd9722fd8657075a05868c157f47a884d0
parentcba3f20fa9af9960205cc5f6ba02e8945811ffb9
diffparse: allow partial staging of deleted files

Eliminate the "Malformed Diff" error that happens when partially
staging a deleted file.

Rework the diff parser so that it can support doing partial
staging against deleted files.  We cannot partially-stage the
deletion itself, but we can make the file empty.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/diffparse.py
test/diffparse_test.py