@Override public Sha1HashCode computeSha1(Path pathRelativeToProjectRootOrJustAbsolute) throws IOException { Path fileToHash = getPathForRelativePath(pathRelativeToProjectRootOrJustAbsolute); if (fileToHash.startsWith(mount.getMountPoint())) { Path entry = mount.getMountPoint().relativize(fileToHash); // TODO(bolinfest): Generalize this to check if entry is under any of the Eden client's bind // mounts rather than hardcoding a test for buck-out/. if (!entry.startsWith(buckPaths.getBuckOut())) { try { return mount.getSha1(entry); } catch (TException | EdenError e) { throw new IOException(e); } } } return delegate.computeSha1(pathRelativeToProjectRootOrJustAbsolute); }
@Override public Path getPathForRelativePath(Path pathRelativeToProjectRootOrJustAbsolute) { return delegate.getPathForRelativePath(pathRelativeToProjectRootOrJustAbsolute); }