MCPcopy Create free account
hub / github.com/Qovery/engine / checkout_files_for_commit

Method checkout_files_for_commit

lib-engine/src/cmd/git_lfs.rs:109–142  ·  view source on GitHub ↗
(
        &self,
        repo_path: P,
        commit: &str,
        cmd_killer: &CommandKiller,
    )

Source from the content-addressed store, hash-verified

107 }
108
109 pub fn checkout_files_for_commit<P>(
110 &self,
111 repo_path: P,
112 commit: &str,
113 cmd_killer: &CommandKiller,
114 ) -> Result<(), GitLfsError>
115 where
116 P: AsRef<Path>,
117 {
118 git_lfs_exec(
119 &[
120 "-C",
121 repo_path.as_ref().to_string_lossy().as_ref(),
122 "lfs",
123 "fetch",
124 "origin",
125 commit,
126 ],
127 &self.get_all_envs(&[]),
128 &mut |line| info!("{line}"),
129 &mut |line| warn!("{line}"),
130 cmd_killer,
131 )?;
132
133 git_lfs_exec(
134 &["-C", repo_path.as_ref().to_string_lossy().as_ref(), "lfs", "checkout"],
135 &self.get_all_envs(&[]),
136 &mut |line| info!("{line}"),
137 &mut |line| warn!("{line}"),
138 cmd_killer,
139 )?;
140
141 Ok(())
142 }
143}
144
145fn git_lfs_exec<F, X>(

Callers 2

buildMethod · 0.80

Calls 3

git_lfs_execFunction · 0.85
as_refMethod · 0.80
get_all_envsMethod · 0.45

Tested by 1