/// Initializes a repo with an existing Git store at the specified path
Initializes a repo with an existing Git store at the specified path
Initializes a repo with an existing Git store at the specified path
pub fn init_external_git(
        settings: &UserSettings,
        wc_path: PathBuf,
        git_store_path: PathBuf,
    ) -> Arc<ReadonlyRepo> {
        let repo_path = wc_path.join(".jj");
        fs::create_dir(repo_path.clone()).unwrap();
        let store_path = repo_path.join("store");
        let git_store_path = fs::canonicalize(git_store_path).unwrap();
        let mut store_file = File::create(store_path).unwrap();
        store_file
            .write_all(format!("git: {}", git_store_path.to_str().unwrap()).as_bytes())
            .unwrap();
        let store = Box::new(GitStore::load(git_store_path));
        ReadonlyRepo::init(settings, repo_path, wc_path, store)
    }
pub fn init_external_git ( settings : & UserSettings , wc_path : PathBuf , git_store_path : PathBuf , ) -> Arc < ReadonlyRepo > { let repo_path = wc_path . join ( " " ) ; fs :: create_dir ( repo_path . clone ( ) ) . unwrap ( ) ; let store_path = repo_path . join ( " " ) ; let git_store_path = fs :: canonicalize ( git_store_path ) . unwrap ( ) ; let mut store_file = File :: create ( store_path ) . unwrap ( ) ; store_file . write_all ( format ! ( " " git_store_path to_str ( ) unwrap ( ) ) . as_bytes ( ) ) . unwrap ( ) ; let store = Box :: new ( GitStore :: load ( git_store_path ) ) ; ReadonlyRepo :: init ( settings , repo_path , wc_path , store ) }
Initializes a repo with an existing Git store at the specified path
Initializes a repo with an existing Git store at the specified path
settings
&UserSettings
wc_path
PathBuf
git_store_path
PathBuf