/*
* libgit2 "clone" example
*
* Written by the libgit2 contributors
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication along
* with this software. If not, see
* .
*/
#![deny(warnings)]
use git2::build::{CheckoutBuilder, RepoBuilder};
use git2::{FetchOptions, Progress, RemoteCallbacks};
use std::cell::RefCell;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use structopt::StructOpt;
#[derive(StructOpt)]
struct Args {
#[structopt(name = "url")]
arg_url: String,
#[structopt(name = "path")]
arg_path: String,
}
struct State {
progress: Option