mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
ae684f3993
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
29 lines
570 B
C++
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
|