aboutsummaryrefslogtreecommitdiffstats
path: root/src/git.rs
diff options
context:
space:
mode:
authorTeddy Wing2021-05-29 18:25:58 +0200
committerTeddy Wing2021-05-29 18:25:58 +0200
commitc90d237d2d39c1deac5f92344d13160bc16f50b7 (patch)
treef9129727379621823274248ca7d4713ecd952011 /src/git.rs
parentbe1b1f2a3356d6c3b72bbc9fe9b53552ccf3b8b5 (diff)
downloadreflectub-c90d237d2d39c1deac5f92344d13160bc16f50b7.tar.bz2
src/git.rs: Add function documentation
Diffstat (limited to 'src/git.rs')
-rw-r--r--src/git.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/git.rs b/src/git.rs
index 174f19f..017aae3 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -1,6 +1,13 @@
use std::path::Path;
+/// Mirror a repository.
+///
+/// Works like:
+///
+/// ```shell
+/// git clone --mirror URL
+/// ```
pub fn mirror<P: AsRef<Path>>(
url: &str,
path: P,
@@ -27,6 +34,13 @@ pub fn mirror<P: AsRef<Path>>(
Ok(())
}
+/// Update remotes.
+///
+/// Works like:
+///
+/// ```shell
+/// git remote update
+/// ```
pub fn update<P: AsRef<Path>>(
path: P,
) -> Result<(), Box<dyn std::error::Error>> {