From 9196f54c62a32cf312bce8eb2ab7cf06bdfd992a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 26 Sep 2018 17:21:06 +0200 Subject: [PATCH] Remove unused function --- benchmark-new/benchmark_repository/src/lib.rs | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/benchmark-new/benchmark_repository/src/lib.rs b/benchmark-new/benchmark_repository/src/lib.rs index 4630aefed..ca584a85b 100644 --- a/benchmark-new/benchmark_repository/src/lib.rs +++ b/benchmark-new/benchmark_repository/src/lib.rs @@ -120,51 +120,6 @@ impl BenchmarkRepository self } - fn update_branch_storage(&self, branch_name: &str) -> &Self - { - self.fetch_branch(branch_name); - - let mut progress_bar = ProgressBar::new(0); - progress_bar.set_style(BenchmarkRepository::progress_bar_style()); - - { - let mut checkout_builder = CheckoutBuilder::new(); - - let workdir = self.repository.path().parent().expect("invalid repository storage path"); - let branch_storage_path = workdir.join(branch_name); - - checkout_builder.force(); - checkout_builder.target_dir(&branch_storage_path); - checkout_builder.progress( - |path, current, total| BenchmarkRepository::checkout_progress_callback(path, current, total, &mut progress_bar)); - - let object_id = match self.repository.refname_to_id(&format!("refs/remotes/origin/{}", branch_name)) - { - Ok(object_id) => object_id, - Err(error) => panic!("could not look up branch “{}” from remote “origin”: {}", branch_name, error), - }; - - let object = match self.repository.find_object(object_id, None) - { - Ok(object) => object, - Err(error) => panic!("could not retrieve branch “{}” from remote “origin”: {}", branch_name, error), - }; - - info!("Updating branch storage “{}”", branch_name); - - if let Err(error) = self.repository.checkout_tree(&object, Some(&mut checkout_builder)) - { - panic!("failed to update branch storage for “{}”: {}", branch_name, error); - } - } - - progress_bar.finish_and_clear(); - - trace!("Branch storage “{}” is up-to-date", branch_name); - - self - } - fn init(base_path: &Path) -> Repository { let repository = match Repository::init_bare(base_path)