sapling/mononoke-types
Siddharth Agarwal 9eb63ab31f ensure all MPaths are non-empty
Summary:
A lot of Mononoke expects MPath instances to be non-empty, and some
Mononoke code wants empty MPaths. Have formerly-empty `MPath` instances be
represented as `None` instead.

There's a bit of a wart where we have to check for some instances being empty
even though they should never be. This is not a regression -- this is actually
a deficiency in our current type hierarchy being exposed. `Entry` can sometimes
represent a root manifest, but a root path and a root manifest will never be
joined together in practice. We may want to figure out a better way to
represent that in the future.

Also clean up a bunch of code that checks for empty `MPath` instances. That
just isn't possible any more -- yay.

Reviewed By: StanislavGlebik

Differential Revision: D7359048

fbshipit-source-id: 684f908dabaa06cb25b1dd33f4fd7bb021cb5e1b
2018-03-22 05:21:57 -07:00
..
if mononoke-types: add types for file changes 2018-03-20 08:57:42 -07:00
mocks mononoke-types: add a type to represent datetimes 2018-03-20 08:57:42 -07:00
src ensure all MPaths are non-empty 2018-03-22 05:21:57 -07:00