]> git.r.bdr.sh - rbdr/blog/blame_incremental - src/command/remove_remote.rs
Add manual file
[rbdr/blog] / src / command / remove_remote.rs
... / ...
CommitLineData
1use std::io::Result;
2use crate::configuration::Configuration;
3use crate::remote::remove;
4
5pub struct RemoveRemote;
6
7impl RemoveRemote {
8 pub fn new() -> Self {
9 RemoveRemote
10 }
11}
12
13impl super::Command for RemoveRemote {
14 fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
15 vec![]
16 }
17
18 fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
19 remove(&configuration.remote_config)
20 }
21
22 fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
23 vec![]
24 }
25
26 fn command(&self) -> &'static str {
27 "remove-remote"
28 }
29
30 fn help(&self) -> &'static str {
31 "\t\t\tRemoves the git remote"
32 }
33}