<commit_before>use std::convert::From;
use std::fmt;
use std::path::Path;

use git;

#[derive(Debug, Clone)]
pub struct Entry<'a> { name: &'a str, time: &'a str, comment: &'a str, commit: &'a str, }

impl<'a> fmt::Display for Entry<'a> {
    fn fmt(& self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Entry: {} {} {}: {}", self.commit, self.time, self.name, self.comment)
    }
}

impl<'a> Entry<'a> {
    pub fn new(name: &'a str, time: &'a str, comment: &'a str, commit: &'a str) -> Entry<'a> {
        Entry { name:name, time: time, comment: comment, commit : commit }
    }

    pub fn name(&self) -> &str { self.name }
    pub fn time(&self) -> &str { self.time }
    pub fn comment(&self) -> &str { self.comment }
    pub fn commit(&self) -> &str { self.commit }
}

pub struct History<'a> {
    cwd: &'a Path,
}

const GIT_ONE_LINE_DETAILS : [&'static str;2] = ["log", "--pretty=format:'%h|%an|%cr|%s'"];

impl<'a> History<'a> {

    pub fn new(cwd: &Path) -> History { History{ cwd : cwd } }

    pub fn len(&self) -> i32 {
        let mut args: Vec<&str> = GIT_ONE_LINE_DETAILS.to_vec();
        args.push(" | wc -l");

        git::exec_git(self.cwd, &args[ .. ]);

        -1
    }
}<commit_msg>Move log arguments to History struct, as const<commit_after>use std::fmt;
use std::path::Path;

use git;

#[derive(Debug, Clone)]
pub struct Entry<'a> { name: &'a str, time: &'a str, comment: &'a str, commit: &'a str, }

impl<'a> fmt::Display for Entry<'a> {
    fn fmt(& self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Entry: {} {} {}: {}", self.commit, self.time, self.name, self.comment)
    }
}

impl<'a> Entry<'a> {
    pub fn new(name: &'a str, time: &'a str, comment: &'a str, commit: &'a str) -> Entry<'a> {
        Entry { name:name, time: time, comment: comment, commit : commit }
    }

    pub fn name(&self) -> &str { self.name }
    pub fn time(&self) -> &str { self.time }
    pub fn comment(&self) -> &str { self.comment }
    pub fn commit(&self) -> &str { self.commit }
}

pub struct History<'a> {
    cwd: &'a Path,
}

impl<'a> History<'a> {
    const GIT_ONE_LINE_DETAILS : [&'static str;2] = ["log", "--pretty=format:'%h|%an|%cr|%s'"];

    pub fn new(cwd: &Path) -> History { History{ cwd : cwd } }

    pub fn len(&self) -> i32 {
        let mut args: Vec<&str> = History::GIT_ONE_LINE_DETAILS.to_vec();
        args.push(" | wc -l");

        git::exec_git(self.cwd, &args[ .. ]);

        -1
    }
}
{'fraction_non_alphanumeric': 0.21193666260657734, 'fraction_numerical': 0.0032480714575720666, 'mean_word_length': 2.9806138933764137, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 39, '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': '2431835', 'n_tokens_mistral': 961, 'n_tokens_neox': 965, 'n_words': 253}