mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-14 07:20:34 +08:00
cli: remove unused cli::git methods
The methods appear not to be called anywhere.
This commit is contained in:
@@ -233,23 +233,6 @@ pub fn branch_remote(repo: &Repository, branch: &str) -> anyhow::Result<String>
|
||||
Ok(remote)
|
||||
}
|
||||
|
||||
/// Call `git pull`, optionally with `--force`.
|
||||
pub fn pull(repo: &Path, force: bool) -> io::Result<String> {
|
||||
let mut args = vec!["-c", "color.diff=always", "pull", "-v"];
|
||||
if force {
|
||||
args.push("--force");
|
||||
}
|
||||
git(repo, args)
|
||||
}
|
||||
|
||||
/// Clone the given repository via `git clone` into a directory.
|
||||
pub fn clone(repo: &str, destination: &Path) -> Result<String, io::Error> {
|
||||
git(
|
||||
Path::new("."),
|
||||
["clone", repo, &destination.to_string_lossy()],
|
||||
)
|
||||
}
|
||||
|
||||
/// Check that the system's git version is supported. Returns an error otherwise.
|
||||
pub fn check_version() -> Result<Version, anyhow::Error> {
|
||||
let git_version = git::version()?;
|
||||
@@ -302,14 +285,6 @@ pub fn add_tag(
|
||||
Ok(oid)
|
||||
}
|
||||
|
||||
pub fn push_tag(tag_name: &str) -> io::Result<String> {
|
||||
git(Path::new("."), vec!["push", "rad", "tag", tag_name])
|
||||
}
|
||||
|
||||
pub fn push_branch(name: &str) -> io::Result<String> {
|
||||
git(Path::new("."), vec!["push", "rad", name])
|
||||
}
|
||||
|
||||
fn write_gitsigner(mut w: impl io::Write, signer: &NodeId) -> io::Result<()> {
|
||||
writeln!(w, "{} {}", signer, ssh::fmt::key(signer))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user