pub fn hash_file<P: AsRef<Path>>(kind: ObjectType, path: P) -> Result<Oid, Error> {
        ::init();

        let rpath = try!(path.as_ref().into_c_string());

        let mut out = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] };
        unsafe {
            try_call!(raw::git_odb_hashfile(&mut out,
                                            rpath,
                                            kind.raw()));
        }

        Ok(Oid { raw: out })
    }
/// Hashes the content of the provided file as an object of the provided type,
/// and returns an Oid corresponding to the result. This does not store the object
/// inside any object database or repository.
Hashes the content of the provided file as an object of the provided type,
and returns an Oid corresponding to the result. This does not store the object
inside any object database or repository.
Hashes the content of the provided file as an object of the provided type and returns an Oid corresponding to the result . This does not store the object inside any object database or repository .
pub fn hash_file<P: AsRef<Path>>(kind: ObjectType, path: P) -> Result<Oid, Error> {
        ::init();
        let rpath = try!(path.as_ref().into_c_string());
        let mut out = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] };
        unsafe {
            try_call!(raw::git_odb_hashfile(&mut out,
                                            rpath,
                                            kind.raw()));
        }
        Ok(Oid { raw: out })
    }
pub fn hash_file < P : AsRef < Path > > ( kind : ObjectType , path : P ) -> Result < Oid , Error > { :: init ( ) ; let rpath = try ! ( path as_ref ( ) into_c_string ( ) ) ; let mut out = raw :: git_oid { id : [ 0 ; raw :: GIT_OID_RAWSZ ] } ; unsafe { try_call ! ( raw git_odb_hashfile ( mut out rpath kind raw ( ) ) ) ; } Ok ( Oid { raw : out } ) }
Hashes the content of the provided file as an object of the provided type,
and returns an Oid corresponding to the result.
Hashes the content of the provided file as an object of the provided type and returns an Oid corresponding to the result .
kind
ObjectType
path
P
kind
ObjectType
path
P