def file_hash(self, load, fnd):
        if 'env' in load:
            salt.utils.warn_until(
                'Oxygen',
                'Parameter \'env\' has been detected in the argument list.  This '
                'parameter is no longer used and has been replaced by \'saltenv\' '
                'as of Salt Carbon.  This warning will be removed in Salt Oxygen.'
                )
            load.pop('env')

        if not all(x in load for x in ('path', 'saltenv')):
            return ''
        ret = {'hash_type': self.opts['hash_type']}
        relpath = fnd['rel']
        path = fnd['path']
        hashdest = os.path.join(self.hash_cachedir,
                                load['saltenv'],
                                '{0}.hash.{1}'.format(relpath,
                                                      self.opts['hash_type']))
        if not os.path.isfile(hashdest):
            if not os.path.exists(os.path.dirname(hashdest)):
                os.makedirs(os.path.dirname(hashdest))
            ret['hsum'] = salt.utils.get_hash(path, self.opts['hash_type'])
            with salt.utils.fopen(hashdest, 'w+') as fp_:
                fp_.write(ret['hsum'])
            return ret
        else:
            with salt.utils.fopen(hashdest, 'rb') as fp_:
                ret['hsum'] = fp_.read()
            return ret
Return a file hash, the hash type is set in the master config file
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitFS.file_hash