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:
Chad Austin 2017-11-09 15:51:44 -08:00 committed by Facebook Github Bot
parent db24c8b7c9
commit 32ba74fe46
3 changed files with 7 additions and 7 deletions

View File

@ -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();
}

View File

@ -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.

View File

@ -232,7 +232,7 @@ Future<Hash> EdenServiceHandler::getSHA1ForPath(
return makeFuture<Hash>(
InodeError(EINVAL, fileInode, "file is a symlink"));
}
return fileInode->getSHA1();
return fileInode->getSha1();
});
}