Commit Graph

3 Commits

Author SHA1 Message Date
Siddharth Agarwal
d33426121b rename BlobHash to ContentId, UnodeHash to UnodeId
Summary:
External code should consider these identifiers opaque -- the fact
that they're hashes is an implementation detail.

Also a "blob" is too generic here -- what we're talking about is file contents.
In the future (e.g. for 10GB+ files) the content hash might point to something
more complicated than file contents.

Reviewed By: farnz

Differential Revision: D7320932

fbshipit-source-id: 11a781345a1973f0af8222b809004daa948c3a47
2018-03-20 03:07:23 -07:00
Siddharth Agarwal
4073388b7c mononoke-types: add BlobHash and ChangesetId as other typed hashes
Summary:
I think it makes a lot of logical sense to have three separate hash
types:

* `ChangesetId` for changesets
* `UnodeHash` for unodes
* `BlobHash` for file blobs

These three are never going to mix. Note that manifests and file unodes are
going to mix in e.g. tree manifest unodes.

Reviewed By: farnz

Differential Revision: D7300742

fbshipit-source-id: 688b410f7a5304fdd5ab3a6800137632887f97b9
2018-03-16 10:15:05 -07:00
Siddharth Agarwal
a7912e687f add a new hash type for unodes
Summary:
These hashes will be the used throughout Mononoke's data model.

Also add mocks.

Note that a `UnodeHash` cannot be null.

Reviewed By: farnz

Differential Revision: D7260955

fbshipit-source-id: d5be5c67848e7b93218a26282e0a757708df7e62
2018-03-14 18:46:46 -07:00