mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
rename FileInode::getSHA1 to FileInode::getSha1
Summary: Make this function match our C++ guidelines. Reviewed By: wez Differential Revision: D6288591 fbshipit-source-id: 1a4f52a8c1e0497df938533fe29da10264eb1ccf
This commit is contained in:
parent
db24c8b7c9
commit
32ba74fe46
@ -251,7 +251,7 @@ bool FileInode::isSameAs(const Blob& blob, mode_t mode) {
|
||||
return result.value();
|
||||
}
|
||||
|
||||
return getSHA1().value() == Hash::sha1(&blob.getContents());
|
||||
return getSha1().value() == Hash::sha1(&blob.getContents());
|
||||
}
|
||||
|
||||
folly::Future<bool> FileInode::isSameAs(const Hash& blobID, mode_t mode) {
|
||||
@ -262,7 +262,7 @@ folly::Future<bool> FileInode::isSameAs(const Hash& blobID, mode_t mode) {
|
||||
|
||||
return getMount()->getObjectStore()->getBlobMetadata(blobID).then(
|
||||
[self = inodePtrFromThis()](const BlobMetadata& metadata) {
|
||||
return self->getSHA1().value() == metadata.sha1;
|
||||
return self->getSha1().value() == metadata.sha1;
|
||||
});
|
||||
}
|
||||
|
||||
@ -357,10 +357,10 @@ Future<string> FileInode::getxattr(StringPiece name) {
|
||||
return makeFuture<string>(InodeError(kENOATTR, inodePtrFromThis()));
|
||||
}
|
||||
|
||||
return getSHA1().then([](Hash hash) { return hash.toString(); });
|
||||
return getSha1().then([](Hash hash) { return hash.toString(); });
|
||||
}
|
||||
|
||||
Future<Hash> FileInode::getSHA1(bool failIfSymlink) {
|
||||
Future<Hash> FileInode::getSha1(bool failIfSymlink) {
|
||||
auto state = state_.wlock();
|
||||
state->checkInvariants();
|
||||
|
||||
@ -686,7 +686,7 @@ Future<Unit> FileInode::materializeForWrite(int openFlags) {
|
||||
// Update the FileInode to indicate that we are materialized now
|
||||
state->blob.reset();
|
||||
state->hash = folly::none;
|
||||
|
||||
|
||||
return makeFuture();
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ class FileInode : public InodeBase {
|
||||
* file.
|
||||
*/
|
||||
void updateOverlayHeader() const override;
|
||||
folly::Future<Hash> getSHA1(bool failIfSymlink = true);
|
||||
folly::Future<Hash> getSha1(bool failIfSymlink = true);
|
||||
|
||||
/**
|
||||
* Compute the path to the overlay file for this item.
|
||||
|
@ -232,7 +232,7 @@ Future<Hash> EdenServiceHandler::getSHA1ForPath(
|
||||
return makeFuture<Hash>(
|
||||
InodeError(EINVAL, fileInode, "file is a symlink"));
|
||||
}
|
||||
return fileInode->getSHA1();
|
||||
return fileInode->getSha1();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user