save-cmd.py: don't crash when a path disappears between index and save.
Protect calls to metadata.from_path() with a try/catch and defer
errors via add_error() instead of just crashing.
Signed-off-by: Damien Robert <damien.olivier.robert@gmail.com>
[git@tim-riemenschneider.de: rebase to current tmp/pending/meta: since
metadata is (now) stored in the index, only 1 of 2 hunks still
applies (race condition between reading the file for its content and
stat-ing it for metadata).]
[rlb@defaultvalue.org: edit commit message; squash file and dir
removal fixes into this commit; limit the scope of the try/catch to
the from_path() call, and put the remaining code in an else clause.] Signed-off-by: Rob Browning <rlb@defaultvalue.org>