diff options
Diffstat (limited to 'server/src/git_root.rs')
| -rw-r--r-- | server/src/git_root.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/git_root.rs b/server/src/git_root.rs index 31e4d45..f818495 100644 --- a/server/src/git_root.rs +++ b/server/src/git_root.rs @@ -62,6 +62,20 @@ impl Roots { Ok(()) } + + pub async fn del_branch(&self, project_id: &str, branch: &str) -> Result<(), git::Error> { + let repo; + { + let data = self.data.lock().unwrap(); + if let Some(tmp_repo) = data.project_repo.get(project_id) { + repo = tmp_repo.clone(); + } else { + return Ok(()); + } + } + + repo.delete_branch(branch).await + } } #[derive(Debug)] |
