pub unsafe fn from_raw(raw: *const raw::git_index_entry) -> IndexEntry {
        let raw::git_index_entry {
            ctime, mtime, dev, ino, mode, uid, gid, file_size, id, flags,
            flags_extended, path
        } = *raw;
        IndexEntry {
            dev: dev as uint,
            ino: ino as uint,
            mode: mode as uint,
            uid: uid as uint,
            gid: gid as uint,
            file_size: file_size as u64,
            id: Oid::from_raw(&id),
            flags: flags as u16,
            flags_extended: flags_extended as u16,
            path: CString::new(path, false).clone(),
            mtime: time::Timespec {
                sec: mtime.seconds as i64,
                nsec: mtime.nanoseconds as i32,
            },
            ctime: time::Timespec {
                sec: ctime.seconds as i64,
                nsec: ctime.nanoseconds as i32,
            },
        }
    }
/// Creates a new entry from its raw pointer.
Creates a new entry from its raw pointer.
Creates a new entry from its raw pointer .
pub unsafe fn from_raw(raw: *const raw::git_index_entry) -> IndexEntry {
        let raw::git_index_entry {
            ctime, mtime, dev, ino, mode, uid, gid, file_size, id, flags,
            flags_extended, path
        } = *raw;
        IndexEntry {
            dev: dev as uint,
            ino: ino as uint,
            mode: mode as uint,
            uid: uid as uint,
            gid: gid as uint,
            file_size: file_size as u64,
            id: Oid::from_raw(&id),
            flags: flags as u16,
            flags_extended: flags_extended as u16,
            path: CString::new(path, false).clone(),
            mtime: time::Timespec {
                sec: mtime.seconds as i64,
                nsec: mtime.nanoseconds as i32,
            },
            ctime: time::Timespec {
                sec: ctime.seconds as i64,
                nsec: ctime.nanoseconds as i32,
            },
        }
    }
pub unsafe fn from_raw ( raw : * const raw :: git_index_entry ) -> IndexEntry { let raw :: git_index_entry { ctime , mtime , dev , ino , mode , uid , gid , file_size , id , flags , flags_extended , path } = * raw ; IndexEntry { dev : dev as uint , ino : ino as uint , mode : mode as uint , uid : uid as uint , gid : gid as uint , file_size : file_size as u64 , id : Oid :: from_raw ( & id ) , flags : flags as u16 , flags_extended : flags_extended as u16 , path : CString :: new ( path , false ) . clone ( ) , mtime : time :: Timespec { sec : mtime . seconds as i64 , nsec : mtime . nanoseconds as i32 , } , ctime : time :: Timespec { sec : ctime . seconds as i64 , nsec : ctime . nanoseconds as i32 , } , } }
Creates a new entry from its raw pointer.
Creates a new entry from its raw pointer .
raw
*const raw::git_index_entry
raw
*const raw::git_index_entry