MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / new_abbr

Method new_abbr

flow-quickstart/src/git.rs:89–98  ·  view source on GitHub ↗

Creates a new `GitConfig`, first with `new` and then as a GitHub `owner/repo` remote, like [hub]. [hub]: https://github.com/github/hub

(
        git: Cow<'a, str>,
        branch: Option<String>,
        identity: Option<PathBuf>,
    )

Source from the content-addressed store, hash-verified

87 ///
88 /// [hub]: https://github.com/github/hub
89 pub fn new_abbr(
90 git: Cow<'a, str>,
91 branch: Option<String>,
92 identity: Option<PathBuf>,
93 ) -> Result<Self> {
94 Self::new(git.clone(), branch.clone(), identity.clone()).or_else(|_| {
95 let full_remote = format!("https://github.com/{}.git", &git);
96 Self::new(full_remote.into(), branch, identity)
97 })
98 }
99}
100
101pub fn create(project_dir: &Path, config: GitConfig) -> Result<String> {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected