<commit_before>#![feature(advanced_slice_patterns, slice_patterns)]

extern crate git_together;

use std::env;
use std::process::Command;
use git_together::GitTogether;
use git_together::config::GitConfig;

fn main() {
  let config = GitConfig { namespace: "git-together".into() };
  let gt = GitTogether { config: config };

  let all_args: Vec<_> = env::args().skip(1).collect();
  let args: Vec<&str> = all_args.iter().map(String::as_ref).collect();

  match &args[..] {
    &["with", ref inits..] => {
      gt.set_authors(inits).unwrap();
    }
    &[sub_cmd, ref rest..] if sub_cmd == "commit" => {
      let mut git_cmd = Command::new("git");
      let cmd = git_cmd.arg(sub_cmd).args(rest);
      let signoff = gt.add_signoff(cmd).unwrap();
      signoff.status().unwrap();
    }
    x => {
      println!("{:?}", x);
    }
  }
}<commit_msg>pass through other subcommands to git<commit_after>#![feature(advanced_slice_patterns, slice_patterns)]

extern crate git_together;

use std::env;
use std::process::Command;
use git_together::GitTogether;
use git_together::config::GitConfig;

fn main() {
  let config = GitConfig { namespace: "git-together".into() };
  let gt = GitTogether { config: config };

  let all_args: Vec<_> = env::args().skip(1).collect();
  let args: Vec<&str> = all_args.iter().map(String::as_ref).collect();

  match &args[..] {
    &["with", ref inits..] => {
      gt.set_authors(inits).unwrap();
    }
    &[sub_cmd, ref rest..] if sub_cmd == "commit" => {
      let mut git_cmd = Command::new("git");
      let cmd = git_cmd.arg(sub_cmd).args(rest);
      let signoff = gt.add_signoff(cmd).unwrap();
      signoff.status().unwrap();
    }
    args => {
      Command::new("git").args(args).status().unwrap();
    }
  }
}
{'fraction_non_alphanumeric': 0.19099201824401368, 'fraction_numerical': 0.0011402508551881414, 'mean_word_length': 3.7432432432432434, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '2581892', 'n_tokens_mistral': 640, 'n_tokens_neox': 619, 'n_words': 122}