1
0
Fork 0

Remove unused function

This commit is contained in:
Patrick Lühne 2018-09-26 17:21:06 +02:00
parent 0710ee8a44
commit 9196f54c62
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 0 additions and 45 deletions

View File

@ -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)