pub fn update_all<T: ToCStr>(&mut self,
                                 pathspecs: &[T],
                                 mut cb: Option<IndexMatchedPath>)
                                 -> Result<(), Error> {
        let arr = pathspecs.iter().map(|t| t.to_c_str()).collect::<Vec<CString>>();
        let strarray = arr.iter().map(|c| c.as_ptr())
                          .collect::<Vec<*const libc::c_char>>();
        let ptr = cb.as_mut();
        let raw_strarray = raw::git_strarray {
            strings: strarray.as_ptr() as *mut _,
            count: strarray.len() as libc::size_t,
        };
        let callback = ptr.as_ref().map(|_| index_matched_path_cb);
        unsafe {
            try_call!(raw::git_index_update_all(self.raw,
                                                &raw_strarray,
                                                callback,
                                                ptr.map(|p| p as *mut _)
                                                   .unwrap_or(0 as *mut _)
                                                        as *mut libc::c_void));
        }
        return Ok(());
    }
/// Update all index entries to match the working directory
///
/// This method will fail in bare index instances.
///
/// This scans the existing index entries and synchronizes them with the
/// working directory, deleting them if the corresponding working directory
/// file no longer exists otherwise updating the information (including
/// adding the latest version of file to the ODB if needed).
///
/// If you provide a callback function, it will be invoked on each matching
/// item in the index immediately before it is updated (either refreshed or
/// removed depending on working directory state). Return 0 to proceed with
/// updating the item, > 0 to skip the item, and < 0 to abort the scan.
Update all index entries to match the working directory
This method will fail in bare index instances.

This scans the existing index entries and synchronizes them with the
working directory, deleting them if the corresponding working directory
file no longer exists otherwise updating the information (including
adding the latest version of file to the ODB if needed).

If you provide a callback function, it will be invoked on each matching
item in the index immediately before it is updated (either refreshed or
removed depending on working directory state). Return 0 to proceed with
updating the item, > 0 to skip the item, and < 0 to abort the scan.
Update all index entries to match the working directory This method will fail in bare index instances . This scans the existing index entries and synchronizes them with the working directory deleting them if the corresponding working directory file no longer exists otherwise updating the information ( including adding the latest version of file to the ODB if needed ) . If you provide a callback function it will be invoked on each matching item in the index immediately before it is updated ( either refreshed or removed depending on working directory state ) . Return 0 to proceed with updating the item > 0 to skip the item and < 0 to abort the scan .
pub fn update_all<T: ToCStr>(&mut self,
                                 pathspecs: &[T],
                                 mut cb: Option<IndexMatchedPath>)
                                 -> Result<(), Error> {
        let arr = pathspecs.iter().map(|t| t.to_c_str()).collect::<Vec<CString>>();
        let strarray = arr.iter().map(|c| c.as_ptr())
                          .collect::<Vec<*const libc::c_char>>();
        let ptr = cb.as_mut();
        let raw_strarray = raw::git_strarray {
            strings: strarray.as_ptr() as *mut _,
            count: strarray.len() as libc::size_t,
        };
        let callback = ptr.as_ref().map(|_| index_matched_path_cb);
        unsafe {
            try_call!(raw::git_index_update_all(self.raw,
                                                &raw_strarray,
                                                callback,
                                                ptr.map(|p| p as *mut _)
                                                   .unwrap_or(0 as *mut _)
                                                        as *mut libc::c_void));
        }
        return Ok(());
    }
pub fn update_all < T : ToCStr > ( & mut self , pathspecs : & [ T ] , mut cb : Option < IndexMatchedPath > ) -> Result < ( ) , Error > { let arr = pathspecs . iter ( ) . map ( | t | t . to_c_str ( ) ) . collect :: < Vec < CString > > ( ) ; let strarray = arr . iter ( ) . map ( | c | c . as_ptr ( ) ) . collect :: < Vec < * const libc :: c_char > > ( ) ; let ptr = cb . as_mut ( ) ; let raw_strarray = raw :: git_strarray { strings : strarray . as_ptr ( ) as * mut _ , count : strarray . len ( ) as libc :: size_t , } ; let callback = ptr . as_ref ( ) . map ( | _ | index_matched_path_cb ) ; unsafe { try_call ! ( raw git_index_update_all ( self raw raw_strarray callback ptr map ( p p as mut ) unwrap_or ( 0 as mut ) as mut libc c_void ) ) ; } return Ok ( ( ) ) ; }
Update all index entries to match the working directory
This method will fail in bare index instances.
Update all index entries to match the working directory This method will fail in bare index instances .
&mut self
pathspecs
&[T]
cb
Option<IndexMatchedPath>
&mut self
pathspecs
&[T]
cb
Option<IndexMatchedPath>