`CAS` downloader will not materialize the same Directory digest under two paths
Context
When materializing a Directory which contains the same Directory digest in two different subdirectories, buildgrid/client/cas.py
will only materialize one of them.
For example: a Directory containing two children, each with the same digest might look like this:
directory_one/ # 11989d9ca5924abdd1d1bde480911411fbe500b23cf30abd0312dca1431d1699/338
directory_two/ # 11989d9ca5924abdd1d1bde480911411fbe500b23cf30abd0312dca1431d1699/338
But only directory_two
will actually end up materialized to disk.
This appears to be because pending_directory_digests
contains only a single destination path per Digest, and so cannot track the fact that it will need to recurse into two different subdirectories after fetching a single Directory Digest.