pub fn add_path(&mut self, path: &Path) -> Result<(), Error> {
        // Git apparently expects '/' to be separators for paths
        let mut posix_path = PosixPath::new(".");
        for comp in path.components() {
            posix_path.push(comp);
        }
        unsafe {
            try_call!(raw::git_index_add_bypath(self.raw, posix_path.to_c_str()));
            Ok(())
        }
    }
/// Add or update an index entry from a file on disk
///
/// The file path must be relative to the repository's working folder and
/// must be readable.
///
/// This method will fail in bare index instances.
///
/// This forces the file to be added to the index, not looking at gitignore
/// rules.
///
/// If this file currently is the result of a merge conflict, this file will
/// no longer be marked as conflicting. The data about the conflict will be
/// moved to the "resolve undo" (REUC) section.
Add or update an index entry from a file on disk
The file path must be relative to the repository's working folder and
must be readable.

This method will fail in bare index instances.

This forces the file to be added to the index, not looking at gitignore
rules.

If this file currently is the result of a merge conflict, this file will
no longer be marked as conflicting. The data about the conflict will be
moved to the "resolve undo" (REUC) section.
Add or update an index entry from a file on disk The file path must be relative to the repository ' s working folder and must be readable . This method will fail in bare index instances . This forces the file to be added to the index not looking at gitignore rules . If this file currently is the result of a merge conflict this file will no longer be marked as conflicting . The data about the conflict will be moved to the " resolve undo " ( REUC ) section .
pub fn add_path(&mut self, path: &Path) -> Result<(), Error> {
        // Git apparently expects '/' to be separators for paths
        let mut posix_path = PosixPath::new(".");
        for comp in path.components() {
            posix_path.push(comp);
        }
        unsafe {
            try_call!(raw::git_index_add_bypath(self.raw, posix_path.to_c_str()));
            Ok(())
        }
    }
pub fn add_path ( & mut self , path : & Path ) -> Result < ( ) , Error > { // Git apparently expects '/' to be separators for paths let mut posix_path = PosixPath :: new ( " " ) ; for comp in path . components ( ) { posix_path . push ( comp ) ; } unsafe { try_call ! ( raw git_index_add_bypath ( self raw posix_path to_c_str ( ) ) ) ; Ok ( ( ) ) } }
Add or update an index entry from a file on disk
The file path must be relative to the repository's working folder and
must be readable.
Add or update an index entry from a file on disk The file path must be relative to the repository ' s working folder and must be readable .
&mut self
path
&Path
&mut self
path
&Path