pub fn remove_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_remove_all(self.raw,
                                                &raw_strarray,
                                                callback,
                                                ptr.map(|p| p as *mut _)
                                                   .unwrap_or(0 as *mut _)
                                                        as *mut libc::c_void));
        }
        return Ok(());
    }
/// Remove all matching index entries.
///
/// If you provide a callback function, it will be invoked on each matching
/// item in the index immediately before it is removed. Return 0 to remove
/// the item, > 0 to skip the item, and < 0 to abort the scan.
Remove all matching index entries.
If you provide a callback function, it will be invoked on each matching
item in the index immediately before it is removed. Return 0 to remove
the item, > 0 to skip the item, and < 0 to abort the scan.
Remove all matching index entries . If you provide a callback function it will be invoked on each matching item in the index immediately before it is removed . Return 0 to remove the item > 0 to skip the item and < 0 to abort the scan .
pub fn remove_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_remove_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 remove_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_remove_all ( self raw raw_strarray callback ptr map ( p p as mut ) unwrap_or ( 0 as mut ) as mut libc c_void ) ) ; } return Ok ( ( ) ) ; }
Remove all matching index entries.
Remove all matching index entries .
&mut self
pathspecs
&[T]
cb
Option<IndexMatchedPath>
&mut self
pathspecs
&[T]
cb
Option<IndexMatchedPath>