@@ -7,7 +7,7 @@ use std::{path::Path, process::Command};
77use crate :: repos:: Boilerplate ;
88use crate :: Result ;
99
10- ///
10+ /// Run `git pull {remote} {branch}` on the repository at the given path.
1111pub fn pull ( repo_path : & Path , remote : & str , branch : & str ) -> Result < ( ) > {
1212 let args = [ "pull" , remote, branch] ;
1313 log:: info!( "Executing: git {:?} on {repo_path:?}" , args. join( " " ) ) ;
@@ -28,6 +28,7 @@ pub fn pull(repo_path: &Path, remote: &str, branch: &str) -> Result<()> {
2828 }
2929}
3030
31+ /// Run `git clone {url} {dest_path}` to clone the repository.
3132pub fn clone < S : AsRef < str > , P : AsRef < Path > > ( url : S , dest_path : P ) -> crate :: Result < ( ) > {
3233 let dest_path = dest_path. as_ref ( ) . to_string_lossy ( ) . to_string ( ) ;
3334 let args = [ "clone" , url. as_ref ( ) , dest_path. as_ref ( ) ] ;
@@ -47,6 +48,7 @@ pub fn clone<S: AsRef<str>, P: AsRef<Path>>(url: S, dest_path: P) -> crate::Resu
4748}
4849
4950/// Returns the latest commit hash (as bytes) of the given boilerplate in the repository located at base_path.
51+ /// For this, run `git log --format=%H -n 1 {boilerplate.path()}` on the `{base_path}/{boilerplate.repo_path()}` directory.
5052pub fn hash < P : AsRef < Path > > ( boilerplate : & Boilerplate , base_path : P ) -> Result < Vec < u8 > > {
5153 let base_path = base_path. as_ref ( ) ;
5254 log:: info!(
0 commit comments