pub fn upsert<T: IntoCString>(&mut self, path: T, id: Oid, filemode: FileMode) -> &mut Self {
        let path = util::cstring_to_repo_path(path).unwrap();
        let path_ptr = path.as_ptr();
        self.paths.push(path);
        self.updates.push(raw::git_tree_update {
            action: raw::GIT_TREE_UPDATE_UPSERT,
            id: unsafe { *id.raw() },
            filemode: u32::from(filemode) as raw::git_filemode_t,
            path: path_ptr,
        });
        self
    }
/// Add an update setting the specified `path` to a specific Oid, whether it currently exists
/// or not.
///
/// Note that libgit2 does not support an upsert of a previously removed path, or an upsert
/// that changes the type of an object (such as from tree to blob or vice versa).
Add an update setting the specified `path` to a specific Oid, whether it currently exists
or not.

Note that libgit2 does not support an upsert of a previously removed path, or an upsert
that changes the type of an object (such as from tree to blob or vice versa).
Add an update setting the specified ` path ` to a specific Oid whether it currently exists or not . Note that libgit2 does not support an upsert of a previously removed path or an upsert that changes the type of an object ( such as from tree to blob or vice versa ) .
pub fn upsert<T: IntoCString>(&mut self, path: T, id: Oid, filemode: FileMode) -> &mut Self {
        let path = util::cstring_to_repo_path(path).unwrap();
        let path_ptr = path.as_ptr();
        self.paths.push(path);
        self.updates.push(raw::git_tree_update {
            action: raw::GIT_TREE_UPDATE_UPSERT,
            id: unsafe { *id.raw() },
            filemode: u32::from(filemode) as raw::git_filemode_t,
            path: path_ptr,
        });
        self
    }
pub fn upsert < T : IntoCString > ( & mut self , path : T , id : Oid , filemode : FileMode ) -> & mut Self { let path = util :: cstring_to_repo_path ( path ) . unwrap ( ) ; let path_ptr = path . as_ptr ( ) ; self . paths . push ( path ) ; self . updates . push ( raw :: git_tree_update { action : raw :: GIT_TREE_UPDATE_UPSERT , id : unsafe { * id . raw ( ) } , filemode : u32 :: from ( filemode ) as raw :: git_filemode_t , path : path_ptr , } ) ; self }
Add an update setting the specified `path` to a specific Oid, whether it currently exists
or not.
Add an update setting the specified ` path ` to a specific Oid whether it currently exists or not .
&mut self
path
T
id
Oid
filemode
FileMode
&mut self
path
T
id
Oid
filemode
FileMode