<commit_before>use std::c_str::CString;
use std::iter::Range;
use std::kinds::marker;
use std::mem;
use std::path::PosixPath;

use libc;
use time;

use {raw, Repository, Error, Tree, Oid, IndexAddOption};

/// A structure to represent a git [index][1]
///
/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects
pub struct Index {
    raw: *mut raw::git_index,
    marker: marker::NoSync,
}

/// An iterator over the entries in an index
pub struct IndexEntries<'a> {
    range: Range<uint>,
    index: &'a Index,
}

pub type IndexMatchedPath<'a> = |&[u8], &[u8]|: 'a -> int;

/// A structure to represent an entry or a file inside of an index.
///
/// All fields of an entry are public for modification and inspection. This is
/// also how a new index entry is created.
#[allow(missing_docs)]
pub struct IndexEntry {
    pub ctime: time::Timespec,
    pub mtime: time::Timespec,
    pub dev: uint,
    pub ino: uint,
    pub mode: uint,
    pub uid: uint,
    pub gid: uint,
    pub file_size: u64,
    pub id: Oid,
    pub flags: u16,
    pub flags_extended: u16,
    pub path: CString,
}
<commit_msg>Update to rust master<commit_after>use std::c_str::CString;
use std::iter::Range;
use std::kinds::marker;
use std::mem;
use std::path::PosixPath;

use libc;
use time;

use {raw, Repository, Error, Tree, Oid, IndexAddOption};

/// A structure to represent a git [index][1]
///
/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects
pub struct Index {
    raw: *mut raw::git_index,
    marker: marker::NoSync,
}

/// An iterator over the entries in an index
pub struct IndexEntries<'a> {
    range: Range<uint>,
    index: &'a Index,
}

/// Callback invoked when matching paths contained inside the index
pub type IndexMatchedPath<'a> = |&[u8], &[u8]|: 'a -> int;

/// A structure to represent an entry or a file inside of an index.
///
/// All fields of an entry are public for modification and inspection. This is
/// also how a new index entry is created.
#[allow(missing_docs)]
pub struct IndexEntry {
    pub ctime: time::Timespec,
    pub mtime: time::Timespec,
    pub dev: uint,
    pub ino: uint,
    pub mode: uint,
    pub uid: uint,
    pub gid: uint,
    pub file_size: u64,
    pub id: Oid,
    pub flags: u16,
    pub flags_extended: u16,
    pub path: CString,
}

{'fraction_non_alphanumeric': 0.13917975567190227, 'fraction_numerical': 0.008726003490401396, 'mean_word_length': 3.285981308411215, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1143321', 'n_tokens_mistral': 800, 'n_tokens_neox': 791, 'n_words': 282}