int git_clone_bare( git_repository **out, const char *origin_url, const char *dest_path, git_transfer_progress_callback fetch_progress_cb, void *fetch_progress_payload) { assert(out && origin_url && dest_path); return clone_internal( out, origin_url, dest_path, fetch_progress_cb, fetch_progress_payload, NULL, 1); }
int git_clone( git_repository **out, const char *origin_url, const char *workdir_path, git_transfer_progress_callback fetch_progress_cb, void *fetch_progress_payload, git_checkout_opts *checkout_opts) { assert(out && origin_url && workdir_path); return clone_internal( out, origin_url, workdir_path, fetch_progress_cb, fetch_progress_payload, checkout_opts, 0); }
Hierarchy create_clone(Hierarchy d) { std::map<Particle*,Particle*> map; Hierarchy nh= clone_internal(d, map, true); Bonds bds= get_internal_bonds(d); for (unsigned int i=0; i< bds.size(); ++i) { Bonded e0= bds[i].get_bonded(0); Bonded e1= bds[i].get_bonded(1); Particle *np0= map[e0.get_particle()]; Particle *np1= map[e1.get_particle()]; Bonded ne0, ne1; if (Bonded::particle_is_instance(np0)) { ne0=Bonded(np0); } else { ne0=Bonded::setup_particle(np0); } if (Bonded::particle_is_instance(np1)) { ne1=Bonded(np1); } else { ne1=Bonded::setup_particle(np1); } create_bond(ne0, ne1, bds[i]); } return nh; }
Hierarchy create_clone_one(Hierarchy d) { std::map<Particle*,Particle*> map; return clone_internal(d, map, false); }