sapling/eden/fs/store/BlobMetadata.h
Andrey Chursin ae684f3993 explicit Hash20 instead of Hash [proxy hash removal 2/n]
Summary:
This is fairly mechanical diff that finalizes split of Hash into ObjectId and Hash20.

More specifically this diff does two things:
* Replaces `Hash` with `Hash20`
* Removes alias `using Hash = Hash20`

Reviewed By: chadaustin

Differential Revision: D31324202

fbshipit-source-id: 780b6d2a422ddf6d0f3cfc91e3e70ad10ebaa8b4
2021-10-01 12:43:26 -07:00

29 lines
570 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include <cstdint>
#include "eden/fs/model/Hash.h"
namespace facebook::eden {
/**
* A small struct containing both the size and the SHA-1 hash of
* a Blob's contents.
*/
class BlobMetadata {
public:
BlobMetadata(Hash20 contentsHash, uint64_t fileLength)
: sha1(contentsHash), size(fileLength) {}
Hash20 sha1;
uint64_t size;
};
} // namespace facebook::eden