pijul 0.3.2

A patch-based distributed version control system, easy to use and fast. Command-line interface.
use commands::fs_operation;
use commands::fs_operation::Operation;
use commands::StaticSubcommand;
use clap::{SubCommand, ArgMatches, Arg};
use error;

pub fn invocation() -> StaticSubcommand {
    return SubCommand::with_name("remove")
        .about("remove file from the repository")
        .arg(Arg::with_name("files")
            .multiple(true)
            .help("Files to remove from the repository.")
            .required(true))
        .arg(Arg::with_name("repository")
            .long("repository")
            .help("Repository to remove files from."));
}

pub type Params<'a> = fs_operation::Params<'a>;

pub fn parse_args<'a>(args: &'a ArgMatches) -> Params<'a> {
    return fs_operation::parse_args(args);
}


pub fn run<'a>(args: &Params<'a>) -> Result<Option<()>, error::Error> {
    fs_operation::run(args, Operation::Remove)
}